From cd06996b629e3bfd7ca1550c8f0c0a8530c26010 Mon Sep 17 00:00:00 2001 From: Denis Ryabov Date: Sun, 8 Mar 2015 20:46:35 +0300 Subject: [PATCH] & should be reversed last (to correctly transform "&lt;" to "<" and not to "<") --- js/twister_formatpost.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/twister_formatpost.js b/js/twister_formatpost.js index c524a3f..53026c8 100644 --- a/js/twister_formatpost.js +++ b/js/twister_formatpost.js @@ -342,10 +342,10 @@ function escapeHtmlEntities(str) { function reverseHtmlEntities(str) { return str - .replace(/&/g, '&') .replace(/</g, '<') .replace(/>/g, '>') .replace(/"/g, '"') - .replace(/'/g, "'"); + .replace(/'/g, "'") + .replace(/&/g, '&'); }