Thanks Til,
applied to SVN.
Sebastian
Til Schneider schrieb:
The trim method for strings doesn't work. The regex that matches the
whitespace contains double back slashes (e.g. /^\\s+|\\s+$/g). But since
the regex is defined as a native regex and not using a String, escaping
is not needed. (it should be just /^\s+|\s+$/g instead).
Thus the current trim implementation removes backslashes followed by one
or more of the letter 's' at the beginning and end of strings.
Patch see attachement.
------------------------------------------------------------------------
Index: /home/tschneider/Projekte/qooxdoo/source/script/core/QxNative.js
===================================================================
--- /home/tschneider/Projekte/qooxdoo/source/script/core/QxNative.js
(revision 2760)
+++ /home/tschneider/Projekte/qooxdoo/source/script/core/QxNative.js
(working copy)
@@ -333,15 +333,15 @@
};
String.prototype.trimLeft = function() {
- return this.replace(/^\\s+/, QxConst.CORE_EMPTY);
+ return this.replace(/^\s+/, QxConst.CORE_EMPTY);
};
String.prototype.trimRight = function() {
- return this.replace(/\\s+$/, QxConst.CORE_EMPTY);
+ return this.replace(/\s+$/, QxConst.CORE_EMPTY);
};
String.prototype.trim = function() {
- return this.replace(/^\\s+|\\s+$/g, QxConst.CORE_EMPTY);
+ return this.replace(/^\s+|\s+$/g, QxConst.CORE_EMPTY);
};
String.prototype.add = function(v, sep)
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel