Skip to content

Commit

Permalink
Merge pull request #68 from w3c/zcorpan/escape-quote
Browse files Browse the repository at this point in the history
HTML-escape " for {{GET[foo]}}
  • Loading branch information
jgraham committed Nov 19, 2015
2 parents b6b082f + 7d4222f commit 33ec0bb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion wptserve/pipes.py
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@ def config_replacement(match):

#Should possibly support escaping for other contexts e.g. script
#TODO: read the encoding of the response
return escape(unicode(value)).encode("utf-8")
return escape(unicode(value), quote=True).encode("utf-8")

template_regexp = re.compile(r"{{([^}]*)}}")
new_content, count = template_regexp.subn(config_replacement, content)
Expand Down

0 comments on commit 33ec0bb

Please sign in to comment.