Skip to content

Commit

Permalink
GH-25: HTML 4 browsers don't support ' entity
Browse files Browse the repository at this point in the history
See https://stackoverflow.com/a/2083770 which refers to this spec:

  C.16. The Named Character Reference '
        https://www.w3.org/TR/xhtml1/#C_16

  The named character reference ' (the apostrophe, U+0027) was
  introduced in XML 1.0 but does not appear in HTML. Authors should
  therefore use ' instead of ' to work as expected in HTML
  4 user agents.
  • Loading branch information
sunaku committed Jul 22, 2018
1 parent 002fd4c commit ea5025b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bin/dasht-query-html
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ trap 'exit 44' USR1 # exit with a nonzero status when no results found
function escape(xml) {
gsub("&", "\\&", xml)
gsub("\"", "\\"", xml)
gsub("\047", "\\'", xml)
gsub("\047", "\\'", xml) # https://www.w3.org/TR/xhtml1/#C_16
gsub("<", "\\&lt;", xml)
gsub(">", "\\&gt;", xml)
return xml
Expand Down

0 comments on commit ea5025b

Please sign in to comment.