mirror of
https://github.com/discourse/discourse.git
synced 2024-11-27 23:33:40 +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
|
end
|
||||||
|
|
||||||
def content
|
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
|
end
|
||||||
|
|
||||||
def title
|
def title
|
||||||
@article_rss_item.title.scrub
|
@article_rss_item.title.force_encoding("UTF-8").scrub
|
||||||
end
|
end
|
||||||
|
|
||||||
def user
|
def user
|
||||||
|
|
Loading…
Reference in New Issue
Block a user