diff --git a/core/js/compatibility.js b/core/js/compatibility.js index 3e9178f320..0cfeefab87 100644 --- a/core/js/compatibility.js +++ b/core/js/compatibility.js @@ -23,3 +23,10 @@ if (!Function.prototype.bind) { return fBound; }; } + +//https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/String/Trim +if(!String.prototype.trim) { + String.prototype.trim = function () { + return this.replace(/^\s+|\s+$/g,''); + }; +} \ No newline at end of file