[Glitch] In keyword filter, account for reblogs, HTML and whole-words
Port 6084257fda
to glitch-soc
lolsob-rspec
parent
f94afcb935
commit
1966652cba
|
@ -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 = () => {
|
||||
|
|
Loading…
Reference in New Issue