FIX: Remove invalid chars from feed XMLs (#24001)

* FIX: Remove invalid chars from feed XMLs

See https://meta.discourse.org/t/rss-subscription-broken-by-post-content/282415?u=falco

* Adjust filter condition
This commit is contained in:
Rafael dos Santos Silva
2023-10-19 14:37:37 -03:00
committed by GitHub
parent ad433daf3a
commit 0604dc7d3e
3 changed files with 23 additions and 0 deletions

5
lib/xml_cleaner.rb Normal file
View File

@ -0,0 +1,5 @@
# frozen_string_literal: true
module XmlCleaner
INVALID_CHARACTERS = /[^\x09\x0A\x0D\x20-\uD7FF\uE000-\uFFFD\u{10000}-\u{10FFFF}]/u
end