mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: Invalid Unicode in preload store JSON
This commit is contained in:
@@ -19,6 +19,14 @@ module ApplicationHelper
|
||||
end
|
||||
end
|
||||
|
||||
def escape_unicode(javascript)
|
||||
if javascript
|
||||
javascript.gsub(/\342\200\250/u, '
').gsub(/(<\/)/u, '\u003C/').html_safe
|
||||
else
|
||||
''
|
||||
end
|
||||
end
|
||||
|
||||
def with_format(format, &block)
|
||||
old_formats = formats
|
||||
self.formats = [format]
|
||||
|
||||
Reference in New Issue
Block a user