aboutsummaryrefslogtreecommitdiffstats
path: root/npm_assets/node_modules/jquery/src/deprecated.js
diff options
context:
space:
mode:
authorLibravatarUnit 193 <unit193@unit193.net>2024-04-23 00:38:24 -0400
committerLibravatarUnit 193 <unit193@unit193.net>2024-04-23 00:38:24 -0400
commit0199f695e93782d728bd31857afe54f4df92f351 (patch)
tree34e9030a05a89461d222172615c74891fba1e5ef /npm_assets/node_modules/jquery/src/deprecated.js
parent22b8f5dae59e876643e8e3002f72282f3e8608c5 (diff)
parent9b0e86a8e74768c4fe848fb5ce8d754292db4e3e (diff)
Update upstream source from tag 'upstream/8.3.0'
Update to upstream version '8.3.0' with Debian dir bc13791b86ab63e4473e92288f1749c55a6ad540
Diffstat (limited to 'npm_assets/node_modules/jquery/src/deprecated.js')
-rw-r--r--npm_assets/node_modules/jquery/src/deprecated.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/npm_assets/node_modules/jquery/src/deprecated.js b/npm_assets/node_modules/jquery/src/deprecated.js
index cc13c3c..ca54982 100644
--- a/npm_assets/node_modules/jquery/src/deprecated.js
+++ b/npm_assets/node_modules/jquery/src/deprecated.js
@@ -15,7 +15,9 @@ define( [
// Support: Android <=4.0 only
// Make sure we trim BOM and NBSP
-var rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;
+// Require that the "whitespace run" starts from a non-whitespace
+// to avoid O(N^2) behavior when the engine would try matching "\s+$" at each space position.
+var rtrim = /^[\s\uFEFF\xA0]+|([^\s\uFEFF\xA0])[\s\uFEFF\xA0]+$/g;
// Bind a function to a context, optionally partially applying any
// arguments.
@@ -82,6 +84,6 @@ jQuery.isNumeric = function( obj ) {
jQuery.trim = function( text ) {
return text == null ?
"" :
- ( text + "" ).replace( rtrim, "" );
+ ( text + "" ).replace( rtrim, "$1" );
};
} );