mirror of
https://github.com/django/django.git
synced 2025-09-22 02:02:46 +00:00
Fixed #21725 -- Fixed JavaScript quoting encoding.
Thanks to nedbatchelder for the report.
This commit is contained in:
parent
44814e78cc
commit
1c1dffca75
2 changed files with 6 additions and 1 deletions
|
@ -343,7 +343,7 @@ def javascript_quote(s, quote_double_quotes=False):
|
|||
s = s.replace('</', '<\\/')
|
||||
if quote_double_quotes:
|
||||
s = s.replace('"', '"')
|
||||
return str(ustring_re.sub(fix, s))
|
||||
return ustring_re.sub(fix, s)
|
||||
javascript_quote = allow_lazy(javascript_quote, six.text_type)
|
||||
|
||||
# Expression to match some_token and some_token="with spaces" (and similarly
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue