From 58944c6cf32a122970f9d57b12e36f5b46301e96 Mon Sep 17 00:00:00 2001 From: Daniel Nitsikopoulos Date: Mon, 25 Mar 2024 08:39:59 +1100 Subject: [PATCH] Clean up feeds JSON --- slices/main/decorators/posts/decorator.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/slices/main/decorators/posts/decorator.rb b/slices/main/decorators/posts/decorator.rb index df21b5c..83e23ea 100644 --- a/slices/main/decorators/posts/decorator.rb +++ b/slices/main/decorators/posts/decorator.rb @@ -146,10 +146,12 @@ module Main end def to_h + clean_content = CGI::unescapeHTML(content.gsub(/<\/?[^>]*>/, "")).strip + clean_content = clean_content.gsub(prefix_emoji[0], "") if prefix_emoji { id: slug, emoji: prefix_emoji, - content: raw_content, + content: clean_content, images: (inline_image_sources + photo_sources).compact } end