mirror of
https://github.com/discourse/discourse.git
synced 2024-11-30 23:23:58 +08:00
Merge pull request #4418 from mpalmer/scrub-fixes
Scrub only after converting strings to UTF-8
This commit is contained in:
commit
d72730fed5
|
@ -86,11 +86,11 @@ module Jobs
|
|||
end
|
||||
|
||||
def content
|
||||
@article_rss_item.content.try(:scrub) || @article_rss_item.description.try(:scrub)
|
||||
@article_rss_item.content.try(:force_encoding, "UTF-8").try(:scrub) || @article_rss_item.description.try(:force_encoding, "UTF-8").try(:scrub)
|
||||
end
|
||||
|
||||
def title
|
||||
@article_rss_item.title.scrub
|
||||
@article_rss_item.title.force_encoding("UTF-8").scrub
|
||||
end
|
||||
|
||||
def user
|
||||
|
|
Loading…
Reference in New Issue
Block a user