0
0
Fork 0

Apply filters to poll options (#11174)

* Apply filters to poll options in WebUI

Fixes #11128

* Apply filters to poll options server-side

* Add poll options to searchable text
This commit is contained in:
ThibG 2019-06-25 14:45:14 +02:00 committed by Eugen Rochko
parent 66ac1bd063
commit 47ef4a6c7a
4 changed files with 12 additions and 3 deletions

View file

@ -220,7 +220,8 @@ class FeedManager
status = status.reblog if status.reblog?
!combined_regex.match(Formatter.instance.plaintext(status)).nil? ||
(status.spoiler_text.present? && !combined_regex.match(status.spoiler_text).nil?)
(status.spoiler_text.present? && !combined_regex.match(status.spoiler_text).nil?) ||
(status.preloadable_poll && !combined_regex.match(status.preloadable_poll.options.join("\n\n")).nil?)
end
# Adds a status to an account's feed, returning true if a status was