trimText regexp needs /g

This commit is contained in:
Andy Edinborough 2013-01-02 10:40:56 -06:00
parent 57d6003b65
commit 85706166cc

View File

@ -17,7 +17,7 @@ _html2canvas.Util = {};
_html2canvas.Util.trimText = (function(native){
return function(input){
if(native) { return native.apply( input ); }
else { return ((input || '') + '').replace( /^\s+|\s+$/ , '' ); }
else { return ((input || '') + '').replace( /^\s+|\s+$/g , '' ); }
};
})( String.prototype.trim );