mootools / mootools-core

MooTools Core Repository
https://mootools.net
2.65k stars 511 forks source link

Request/Request.HTML execute non-javascript <script> tags as Javascript #2796

Open Sophist-UK opened 6 years ago

Sophist-UK commented 6 years ago

It doesn't really matter why, but Joomla uses a script tag to store HTML using a non-standard type attribute "text/something which is not javascript or ecmascript". Mootools String.stripScript extracts all script tags regardless of whether the type attribute indicates it as javascript and attempts to execute it which is incorrect functionality.

Note: The script could equally be e.g. vbscript.

stAn47 commented 5 years ago

hello, it's not just joomla, but it seems that mootools provides javascript from all "script" tags including schemas + json+ld + json etc...

these are now standard since google recommends json+ld format for all schema specifications

this produces an error in javascript that breaks other parts of the site.

stan