jquery/src
Michał Gołębiowski-Owczarek 924b515dd3
Manipulation: Don't remove HTML comments from scripts
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
2021-07-19 19:15:27 +02:00
..
ajax Core:Ajax: Align nonce & global with master, fix an AMD issue 2020-02-24 19:10:03 +01:00
attributes Build: Correct code indentations based on jQuery Style Guide 2020-05-05 13:04:46 +02:00
core Core: Report browser errors in parseXML 2020-12-08 11:34:50 +01:00
css Support: ensure display is set to block for the support div (#4844) 2021-02-16 14:34:14 -05:00
data Data: Make the data object a regular object again 2020-04-20 18:11:18 +02:00
deferred Deferred: Give better stack diagnostics on exceptions 2016-05-11 20:21:04 -04:00
deprecated Build: Correct code indentations based on jQuery Style Guide 2020-05-05 13:04:46 +02:00
effects Build: Correct code indentations based on jQuery Style Guide 2020-05-05 13:04:46 +02:00
event Build: Correct code indentations based on jQuery Style Guide 2020-05-05 13:04:46 +02:00
exports Core:Ajax: Align nonce & global with master, fix an AMD issue 2020-02-24 19:10:03 +01:00
manipulation Manipulation: Skip the select wrapper for <option> outside of IE 9 2020-03-30 20:15:09 +02:00
queue Build: Put all AMD modules in "src/" in strict mode 2016-04-25 20:25:08 +02:00
traversing Filter: Use direct filter in winnow 2018-01-17 11:01:08 -05:00
var Core: Bring back QtWebKit support for jQuery 3.x 2020-07-27 22:01:55 +02:00
.eslintrc.json Build: Correct code indentations based on jQuery Style Guide 2020-05-05 13:04:46 +02:00
ajax.js Ajax: Execute JSONP error script responses 2020-08-25 21:43:02 +02:00
attributes.js Build: Put all AMD modules in "src/" in strict mode 2016-04-25 20:25:08 +02:00
callbacks.js Core: deprecate jQuery.type 2018-01-16 10:39:08 -05:00
core.js Build: Correct code indentations based on jQuery Style Guide 2020-05-05 13:04:46 +02:00
css.js Build: Correct code indentations based on jQuery Style Guide 2020-05-05 13:04:46 +02:00
data.js Core: make camelCase function available only for internal usage 2018-01-08 11:21:22 -05:00
deferred.js Deferred: Rename master to primary 2021-01-12 21:04:59 +01:00
deprecated.js Ajax: Deprecate AJAX event aliases, inline event/alias into deprecated 2020-01-21 14:26:35 +01:00
dimensions.js Build: Correct code indentations based on jQuery Style Guide 2020-05-05 13:04:46 +02:00
effects.js Build: Correct code indentations based on jQuery Style Guide 2020-05-05 13:04:46 +02:00
event.js Event: Don't break focus triggering after .on(focus).off(focus) 2021-05-10 19:13:25 +02:00
jquery.js Build:Tests: Fix custom build tests, verify on Travis; name Travis jobs 2020-01-27 18:54:47 +01:00
manipulation.js Manipulation: Don't remove HTML comments from scripts 2021-07-19 19:15:27 +02:00
offset.js Revert "Offset: Send px-ed strings to .css()" 2020-07-20 21:29:40 +02:00
queue.js Core: Deprecate jQuery.isArray 2016-11-30 12:22:24 +01:00
selector-native.js Selector: Make selector-native's isXMLDoc recognize HTML-embedded SVG 2019-07-29 22:06:18 +02:00
selector-sizzle.js Build: Put all AMD modules in "src/" in strict mode 2016-04-25 20:25:08 +02:00
selector.js Build: ESLint details 2016-06-11 10:41:33 +03:00
serialize.js Build: Correct code indentations based on jQuery Style Guide 2020-05-05 13:04:46 +02:00
traversing.js Build: ESLint: forbid unused function parameters 2019-09-26 01:59:57 +02:00
wrap.js Core: deprecate jQuery.isFunction 2018-01-15 09:26:19 -08:00
wrapper.js Docs: Change JS Foundation mentions to OpenJS Foundation 2020-05-18 18:46:27 +02:00