Clean up channel feed

This commit is contained in:
Omar Roth
2018-08-10 08:38:31 -05:00
parent 9fbab6125a
commit 09d4d46fcd
3 changed files with 108 additions and 77 deletions

View File

@@ -272,3 +272,17 @@ def generate_captcha(key)
return {challenge: challenge, token: token}
end
def description_html_to_description(description_html)
if !description_html
description = ""
description_html = ""
else
description_html = description_html.to_s
description = description_html.gsub("<br>", "\n")
description = description.gsub("<br/>", "\n")
description = XML.parse_html(description).content.strip("\n ")
end
return description
end