fix(filters): treat phrases as literal text in the regex
Phrases went into the Postgres and Elixir regexes as they were, so a
phrase like "(" broke the timeline and notification queries. The :re
form also put the word boundaries only around the whole alternation.
Escape each phrase and, as Mastodon does, add a word boundary only where
the phrase starts or ends with a word character.
Reported in Akkoma (d6209837b).
This commit is contained in:
parent
90eb5e4015
commit
f975db8719
3 changed files with 66 additions and 6 deletions
1
changelog.d/filter-regex-escape.fix
Normal file
1
changelog.d/filter-regex-escape.fix
Normal file
|
|
@ -0,0 +1 @@
|
|||
Treat filter phrases as literal text; a phrase like "(" no longer breaks timeline and notification queries, and phrases that start or end with punctuation (like "#tag") now match
|
||||
Loading…
Add table
Add a link
Reference in a new issue