From 912085af67927a293e15f515eb821521464c0d3e Mon Sep 17 00:00:00 2001 From: DracoBlue Date: Sun, 1 May 2016 19:54:41 +0200 Subject: [PATCH] Added config to disable html escaping --- index.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/index.js b/index.js index 2996489..0215b2a 100644 --- a/index.js +++ b/index.js @@ -1124,9 +1124,11 @@ var XBBCODE = (function() { ret.html = ret.html.replace("[", "["); // put ['s back in ret.html = ret.html.replace("]", "]"); // put ['s back in - ret.html = ret.html.replace(/</g, "<"); // unescape HTML tag brackets - ret.html = ret.html.replace(/>/g, ">"); // unescape HTML tag brackets - + if (!config.escapeHtml) { + ret.html = ret.html.replace(/</g, "<"); // unescape HTML tag brackets + ret.html = ret.html.replace(/>/g, ">"); // unescape HTML tag brackets + } + ret.error = (errQueue.length === 0) ? false : true; ret.errorQueue = errQueue;