Clean up feeds JSON
This commit is contained in:
@@ -146,10 +146,12 @@ module Main
|
|||||||
end
|
end
|
||||||
|
|
||||||
def to_h
|
def to_h
|
||||||
|
clean_content = CGI::unescapeHTML(content.gsub(/<\/?[^>]*>/, "")).strip
|
||||||
|
clean_content = clean_content.gsub(prefix_emoji[0], "") if prefix_emoji
|
||||||
{
|
{
|
||||||
id: slug,
|
id: slug,
|
||||||
emoji: prefix_emoji,
|
emoji: prefix_emoji,
|
||||||
content: raw_content,
|
content: clean_content,
|
||||||
images: (inline_image_sources + photo_sources).compact
|
images: (inline_image_sources + photo_sources).compact
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
Reference in New Issue
Block a user