Specific decoration for statuses on index page

This commit is contained in:
2024-02-25 08:55:47 +11:00
parent cae3f8f5f9
commit e7ec361dc0
3 changed files with 24 additions and 2 deletions

View File

@@ -0,0 +1,22 @@
# frozen_string_literal: false
# auto_register: false
require "rexml/parsers/pullparser"
require "sanitize"
require "nokogiri"
module Main
module Decorators
module Statuses
class Decorator < Main::Decorators::Posts::Decorator
def raw_content
Sanitize.fragment(content,
elements: ["img", "p"],
attributes: {"img" => ["alt", "src", "title"]}
)
end
end
end
end
end