webelem: Escape \r in javascript_escape().
This commit is contained in:
parent
8011cefea6
commit
ed4fc4d1ba
@ -310,6 +310,7 @@ def javascript_escape(text):
|
||||
("'", r"\'"), # Then escape ' and " as \' and \".
|
||||
('"', r'\"'), # (note it won't hurt when we escape the wrong one).
|
||||
('\n', r'\n'), # We also need to escape newlines for some reason.
|
||||
('\r', r'\r'),
|
||||
)
|
||||
for orig, repl in replacements:
|
||||
text = text.replace(orig, repl)
|
||||
|
Loading…
Reference in New Issue
Block a user