diff --git a/core/js/compatibility.js b/core/js/compatibility.js
index 3e9178f3200e05b460d23e5005e3ff26db495954..0cfeefab87128329f43dceb35c473fc806c70ca4 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