diff --git a/source/Ox/js/Fallback.js b/source/Ox/js/Fallback.js index 2ab2e492..07e08c9a 100644 --- a/source/Ox/js/Fallback.js +++ b/source/Ox/js/Fallback.js @@ -118,3 +118,10 @@ if (!Object.keys) { return ret; }; } + +// see https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String/Trim +if (!String.prototype.trim) { + String.prototype.trim = function() { + return this.replace(/^\s+|\s+$/g, ''); + }; +}