Rocket.Chat icon indicating copy to clipboard operation
Rocket.Chat copied to clipboard

Regression: Bad words Filtering not working on new Message Parser

Open xareyli opened this issue 3 years ago • 3 comments

Proposed changes (including videos or screenshots)

Was forGH

Now forGH2

Issue(s)

closes https://github.com/RocketChat/Rocket.Chat/issues/27298

Steps to test or reproduce

1.) Turn off legacy message template (if on). Account -> Preferences -> global -> Use legacy message template 2.) Turn on filtering of bad words Administration -> settings -> message -> Allow Message bad words filtering 3.) Add bad words to the bad words list (comma separated) Administration -> settings -> message -> Add Bad Words to the Blacklist 4.) Write a message with bad words. They should be censored.

Further comments

The bug happened because of precedence of message markdown parsing was higher than message censoring.

xareyli avatar Nov 26 '22 12:11 xareyli

Codecov Report

Merging #27368 (2628dfe) into develop (dcaf5e9) will increase coverage by 0.16%. The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop   #27368      +/-   ##
===========================================
+ Coverage    42.20%   42.37%   +0.16%     
===========================================
  Files          812      812              
  Lines        17736    17736              
  Branches      1990     1990              
===========================================
+ Hits          7486     7515      +29     
+ Misses        9960     9931      -29     
  Partials       290      290              
Flag Coverage Δ
e2e 42.37% <ø> (+0.16%) :arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

codecov[bot] avatar Nov 26 '22 13:11 codecov[bot]

Thanks a lot for your contribution @xareyli ! This solution worked!

hugocostadev avatar Nov 30 '22 13:11 hugocostadev

Glad to help ;)

xareyli avatar Nov 30 '22 13:11 xareyli