Fix regexp for $.trim so it doesn't whack embedded spaces.

This commit is contained in:
Dave Methvin 2009-12-06 10:02:15 +08:00 committed by John Resig
parent 628e1564c4
commit abbd2f4c3c

View file

@ -29,7 +29,7 @@ var jQuery = function( selector, context ) {
rnotwhite = /\S/,
// Used for trimming whitespace
rtrim = /(\s|\u00A0)+|(\s|\u00A0)+$/g,
rtrim = /^(\s|\u00A0)+|(\s|\u00A0)+$/g,
// Match a standalone tag
rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>)?$/,