mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-23 15:48:43 -05:00
fix encoding bug
This commit is contained in:
parent
edf6f3012d
commit
bcf0203497
1 changed files with 4 additions and 1 deletions
|
@ -25,7 +25,10 @@ module ApplicationHelper
|
|||
|
||||
def escape_unicode(javascript)
|
||||
if javascript
|
||||
javascript.gsub(/\342\200\250/u, '
').gsub(/(<\/)/u, '\u003C/').html_safe
|
||||
javascript = javascript.dup.force_encoding("utf-8")
|
||||
javascript.gsub!(/\342\200\250/u, '
')
|
||||
javascript.gsub!(/(<\/)/u, '\u003C/')
|
||||
javascript.html_safe
|
||||
else
|
||||
''
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue