Browse Source

Fix bug with Article rendering inline images

v4.2.17+hometown-1.1.2
Darius Kazemi 5 months ago
parent
commit
ccaad54a21
  1. 8
      app/lib/activitypub/activity/create.rb

8
app/lib/activitypub/activity/create.rb

@ -136,8 +136,8 @@ class ActivityPub::Activity::Create < ActivityPub::Activity
class Handler < ::Ox::Sax
attr_reader :srcs, :alts
def initialize(_block)
super
def initialize
super()
@stack = []
@srcs = []
@alts = {}
@ -164,8 +164,8 @@ class ActivityPub::Activity::Create < ActivityPub::Activity
end
def process_inline_images
proc = proc { |name| Rails.logger.debug name }
handler = Handler.new(proc)
handler = Handler.new
Ox.sax_parse(handler, @object['content'])
handler.srcs.each do |src|
# Handle images where the src is formatted as "/foo/bar.png"

Loading…
Cancel
Save