Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

a javascript error is reported on all overrided pages containing javascript with charaters (>,&,<) #229

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

mathieu-mbru
Copy link

Replace source = doc.to_s by source = doc.to_s.gsub('&lt;', '<').gsub('&gt;', '>').gsub('&amp;', '&')
for transforming the encodings

…('&gt;', '>').gsub('&amp;', '&') for transforming the encodings
@nanego
Copy link

nanego commented Mar 17, 2022

A more generic solution may be this one. Can you please give it a try?

-        source = doc.to_s
+        source = CGI.unescapeHTML doc.to_s

@mathieu-mbru
Copy link
Author

Well, thank you for this solution.

@HighwayStar
Copy link

Any updates on this pull? Faced this issue, spent hours to find root of issue with js code after applying deface patches on redmine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants