Node.js based forum software built for the modern web
stringify helper for t.js
Julian Lam8bc2d973527f
diff --git a/public/src/modules/helpers.js b/public/src/modules/helpers.jsindex bc40bde658..e8f77a5614 100644--- a/public/src/modules/helpers.js+++ b/public/src/modules/helpers.js@@ -4,7 +4,7 @@// export the class if we are in a Node-like system.if (typeof module === 'object' && module.exports === exports) {- exports = module.exports/* = SemVer*/;+ exports = module.exports/* = SemVer*/;}var helpers = {};@@ -21,6 +21,11 @@return '<meta ' + name + property + content + '/>';};+ helpers.stringify = function(obj) {+ // Turns the incoming object into a JSON string+ return JSON.stringify(obj).replace(/&/gm,"&").replace(/</gm,"<").replace(/>/gm,">").replace(/"/g, '"');+ };+// Groups helpershelpers.membershipBtn = function(groupObj) {if (groupObj.isMember) {