mirror of
https://github.com/jquery/jquery.git
synced 2024-11-23 02:54:22 +00:00
924b515dd3
When evaluating scripts, jQuery strips out the possible wrapping HTML comment and a CDATA section. However, all supported browsers are already doing that when loading JS via appending a script tag to the DOM which is how we've been doing `jQuery.globalEval` since jQuery 3.0.0. jQuery logic was imperfect, e.g. it just stripped the `<!--` and `-->` markers, respectively at the beginning or the end of the script contents. However, browsers are also stripping everything following those markers in the same line, treating them as single-line comments delimiters; this is now also mandated by ECMAScript 2015 in Annex B. Instead of fixing the jQuery logic, just let the browser do its thing. We still need to strip CDATA sections for backwards compatibility. This shouldn't be needed as in XML documents they're already not visible when inspecting element contents and in HTML documents they have no meaning but we're preserving that logic for backwards compatibility. This will be removed completely in 4.0. Fixes gh-4904 Closes gh-4905 Ref gh-4906 |
||
---|---|---|
.. | ||
data | ||
integration | ||
node_smoke_tests | ||
promises_aplus_adapters | ||
unit | ||
.eslintrc.json | ||
delegatetest.html | ||
hovertest.html | ||
index.html | ||
jquery.js | ||
karma.context.html | ||
karma.debug.html | ||
localfile.html | ||
middleware-mockserver.js | ||
networkerror.html | ||
xhtml.php |