You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
a javascript error is reported on all overrided pages containing javascript with charaters (>,&,<)
Example
We have identified the cause that breaks the javascript code (which is encoded).
The cause is the following:
The view source or partial of type (Nokogiri::HTML::DocumentFragment) which encodes characters by calling the method to_s in (Module Applicator /method apply_overrides ) line 52 (source = doc.to_s) :
Since we trust views files and partials,
By replace this line : source = doc.to_s
by this one : source = doc.to_s.gsub('<', '<').gsub('>', '>').gsub('&', '&')
The problem no longer exists
A PR was carried out on the subject #229
Thank you for considering this update.
The text was updated successfully, but these errors were encountered:
Hello
a javascript error is reported on all overrided pages containing javascript with charaters (>,&,<)
![image](https://user-images.githubusercontent.com/75627140/158623330-40b9a008-f39a-4a41-94cb-6417c706f462.png)
![image](https://user-images.githubusercontent.com/75627140/158623350-72bda739-67bc-4fab-ac61-88e291d26fd4.png)
![image](https://user-images.githubusercontent.com/75627140/158623364-3e42dc39-0b02-4ff2-ba86-e97894154800.png)
![image](https://user-images.githubusercontent.com/75627140/158623430-ff5a1ef3-22c5-4c07-af1b-c327edb7537d.png)
Example
We have identified the cause that breaks the javascript code (which is encoded).
The cause is the following:
The view source or partial of type (Nokogiri::HTML::DocumentFragment) which encodes characters by calling the method to_s in (Module Applicator /method apply_overrides ) line 52 (source = doc.to_s) :
Since we trust views files and partials,
By replace this line :
source = doc.to_s
by this one :
source = doc.to_s.gsub('<', '<').gsub('>', '>').gsub('&', '&')
The problem no longer exists
A PR was carried out on the subject #229
Thank you for considering this update.
The text was updated successfully, but these errors were encountered: