From d2cd9cdea08d5dc78eab47bd0b153aaaee6bece7 Mon Sep 17 00:00:00 2001 From: Simon Grim Date: Fri, 25 Mar 2016 21:46:24 +0500 Subject: [PATCH] =?UTF-8?q?fix=20filterLang()=20to=20cut=20out=20'twist:?= =?UTF-8?q?=E2=80=A6=3D'=20links=20before=20processing?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- js/mobile_abstract.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/mobile_abstract.js b/js/mobile_abstract.js index 8356330..d37ef37 100644 --- a/js/mobile_abstract.js +++ b/js/mobile_abstract.js @@ -551,7 +551,7 @@ function filterLang(string) { langFilterReason = polyglot.t('this doesnt contain that', {'this': polyglot.t(langFilterMode), 'that': polyglot.t('language of this')}); // before detection attempts we cut out any mentions and links, and replace _ with space - langFilterSubj = string.replace(/@\S\w*|https?:\/\/\S*/g, '').replace(/_+/g, ' ') + langFilterSubj = string.replace(/@\S\w*|https?:\/\/\S*|twist:\S\S\S\S\S\S\S\S\S\S\S=/g, '').replace(/_+/g, ' ') // cut out common frequently used words FIXME I believe there is a list of similar international stuff somewhere outside which is waiting for us, we should just find it .replace(/\btwister|tox|github|linux|ubuntu|debian|windows|google|twitter|facebook|microsoft|ping|pong|email|javascript\b/ig, '') // replace zero-width word boundaries, such as between letters from different alphabets [or other symbols], with spaces