From 9b0e86a8e74768c4fe848fb5ce8d754292db4e3e Mon Sep 17 00:00:00 2001 From: Unit 193 Date: Tue, 23 Apr 2024 00:37:58 -0400 Subject: New upstream version 8.3.0. --- npm_assets/node_modules/jquery/src/deprecated.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'npm_assets/node_modules/jquery/src/deprecated.js') 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" ); }; } ); -- cgit v1.2.3