From 8a58afc8e6633008356259ff368862a273248f7e Mon Sep 17 00:00:00 2001 From: Martin Zimmermann Date: Sat, 9 Aug 2014 21:01:56 +0200 Subject: [PATCH] fix order of converting HTML back to text Fixes a regression introduced by ad9384e, which escapes wanted line breaks, such as
and
. --- isso/js/app/utils.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/isso/js/app/utils.js b/isso/js/app/utils.js index 2e3943a..d7bddf4 100644 --- a/isso/js/app/utils.js +++ b/isso/js/app/utils.js @@ -63,8 +63,9 @@ define(["app/i18n"], function(i18n) { }; var detext = function(text) { - return escape(text.replace(/\n\n/gi, '

') - .replace(/\n/gi, '
')); + text = escape(text); + return text.replace(/\n\n/gi, '

') + .replace(/\n/gi, '
'); }; return {