fixing the null pointer exception

revert-70aa11f8
kamidu 8 years ago
parent 530e603fb5
commit 8c17418198

@ -161,6 +161,7 @@ utility = function () {
* @returns {*}
*/
publicMethods.encodeJson = function (text) {
if (text) {
return text
.replace(/\\u003c/g, "<")
.replace(/</g, "&lt;")
@ -169,7 +170,10 @@ utility = function () {
.replace(/\\u0027/g, "&#39;")
.replace(/'/g, "&#39;")
.replace(/\\"/g, "&quot;")
.replace(/\\u0022/g, "&quot;")
.replace(/\\u0022/g, "&quot;");
} else {
return "";
}
};
return publicMethods;

Loading…
Cancel
Save