From 1028fe3fc57542055a0530361d671828e87aac3d Mon Sep 17 00:00:00 2001 From: Denis Ryabov Date: Sun, 23 Mar 2014 11:34:31 +0400 Subject: [PATCH] fix incorrect processing of urls with ampersands --- js/twister_formatpost.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/twister_formatpost.js b/js/twister_formatpost.js index ca555cd..5d7df38 100644 --- a/js/twister_formatpost.js +++ b/js/twister_formatpost.js @@ -183,6 +183,7 @@ function htmlFormatMsg( msg, output, mentions ) { var url; if( space != -1 ) url = tmp.substring(0,space); else url = tmp; if( url.length ) { + msg = tmp.substr(String(url).length); url = url.replace('&', '&'); var extLinkTemplate = $("#external-page-link-template").clone(true); extLinkTemplate.removeAttr("id"); @@ -190,7 +191,6 @@ function htmlFormatMsg( msg, output, mentions ) { extLinkTemplate.html(url); extLinkTemplate.attr("title",url); output.append(extLinkTemplate); - msg = tmp.substr(String(url).length); continue; } }