Skip to content

Commit

Permalink
Don't replace ' by " but just ", fixes #557
Browse files Browse the repository at this point in the history
  • Loading branch information
avernet committed Nov 8, 2012
1 parent 264f509 commit 16f1cf3
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -37,11 +37,11 @@ ORBEON.util.String = _.tap {}, (StringUtils) -> _.extend StringUtils,
escapeForMarkup: (text) ->
# List of characters to replace per http://stackoverflow.com/a/1091953/5295
characters =
'&': '&' # This replacement needs to come first, so we don't replace the & in the subsequent character entity references
'"': '"'
"'": '''
'<': '&lt;'
'>': '&gt;'
'&': '&amp;'
for from, to of characters
text = StringUtils.replace text, from, to
text
Expand Down

0 comments on commit 16f1cf3

Please sign in to comment.