From b5d2b79a372f4bd1faf5d801f92b84929fe46c47 Mon Sep 17 00:00:00 2001 From: Jermolene Date: Sun, 12 Jan 2014 20:11:51 +0000 Subject: [PATCH] Add nbsp handling to htmlDecode --- boot/boot.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/boot/boot.js b/boot/boot.js index 0d05b832a..38d5f5472 100644 --- a/boot/boot.js +++ b/boot/boot.js @@ -207,10 +207,10 @@ $tw.utils.deepDefaults = function(object /*, sourceObjectList */) { }; /* -Convert "&" to &, "<" to <, ">" to > and """ to " +Convert "&" to &, " " to nbsp, "<" to <, ">" to > and """ to " */ $tw.utils.htmlDecode = function(s) { - return s.toString().replace(/</mg,"<").replace(/>/mg,">").replace(/"/mg,"\"").replace(/&/mg,"&"); + return s.toString().replace(/</mg,"<").replace(/ /mg,"\x40").replace(/>/mg,">").replace(/"/mg,"\"").replace(/&/mg,"&"); }; /*