mirror of
https://gh.wpcy.net/https://github.com/discourse/discourse.git
synced 2026-05-13 05:23:46 +08:00
Previously, poll extraction used a greedy regex to strip quotes from raw
content before parsing:
raw = raw.sub(/\[quote.+\/quote\]/m, '')
This matched from the first `[quote` to the LAST `[/quote]`,
accidentally removing everything in between - including the actual poll
- when a post contained multiple quotes. This bug has existed since the
quote-stripping was introduced in April 2022 (
|
||
|---|---|---|
| .. | ||
| poll | ||
| poll.rb | ||
| polls_updater.rb | ||
| polls_validator.rb | ||
| post_extension.rb | ||
| post_validator.rb | ||
| ranked_choice.rb | ||
| user_extension.rb | ||