[Glitch] In keyword filter, account for reblogs, HTML and whole-words

Port 404c7702ec to glitch-soc
pull/567/head
Thibaut Girka 2018-07-09 22:13:52 +02:00 committed by ThibG
parent 00c1386b9d
commit 6777dfc8d9
1 changed files with 1 additions and 1 deletions

View File

@ -45,7 +45,7 @@ export const regexFromFilters = filters => {
return null;
}
return new RegExp(filters.map(filter => escapeRegExp(filter.get('phrase'))).join('|'), 'i');
return new RegExp(filters.map(filter => escapeRegExp(filter.get('phrase'))).map(expr => `\\b${expr}\\b`).join('|'), 'i');
};
export const makeGetStatus = () => {