From 2cc86a55fb9c909e35e201963c5873a61223f24c Mon Sep 17 00:00:00 2001 From: Simon Grim Date: Thu, 14 May 2015 11:41:20 +0500 Subject: [PATCH] fix of htmlFormatMsg() RegExp to allow -+= in hashtags --- 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 c962a71..36ce3d7 100644 --- a/js/twister_formatpost.js +++ b/js/twister_formatpost.js @@ -244,7 +244,7 @@ function htmlFormatMsg(msg, mentions) { return _formatText(escapeHtmlEntities(msg) .replace(/(^|[^\/]\B(?!\S*:\/\/\S*@))@\w+\b/g, htmlMention) - .replace(/(^|[^<\/]\B(?!\S*:\/\/\S*#))#[^#\\\/\.,:;\?\!\*\[\]\(\)\{\}\-\+\=\^\|%'"\u201C\u201D\u2026\u2014\u4E00\u3002\uFF0C\uFF1A\uFF1F\uFF01\u3010\u3011>\s]+/g, htmlHashtag) // unicode escaped stuff is '“”…—一。,:?!【】' for our chinese friends + .replace(/(^|[^<\/]\B(?!\S*:\/\/\S*#))#[^#\\\/\.,:;\?\!\*\[\]\(\)\{\}\^\|%'"\u201C\u201D\u2026\u2014\u4E00\u3002\uFF0C\uFF1A\uFF1F\uFF01\u3010\u3011>\s]+/g, htmlHashtag) // unicode escaped stuff is '“”…—一。,:?!【】' for our chinese friends .replace(/\bhttps?:\/\/\S[^>\s]+/ig, htmlHttp) .replace(/([^<\/])\b(?!\S*:\/\/\S*@)\S+@\S+\.\S[^>\s]+/g, htmlEmail) .replace(/\(\d{1,2}\/\d{1,2}\)$/, htmlSplitCounter)