A lot :)
Some checks failed
/ Run tests (push) Successful in 8m56s
/ Run system tests (push) Failing after 1h0m48s
/ Build, push and deploy image (push) Successful in 7m47s

This commit is contained in:
david 2024-09-05 22:54:38 +02:00
parent aad67af0d1
commit 63fc206c27
153 changed files with 2043 additions and 646 deletions

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
module RichTextTargetBlank
extend ActiveSupport::Concern
@ -11,7 +13,7 @@ module RichTextTargetBlank
rich_text_attribute = send(name)
if rich_text_attribute.present?
doc = Nokogiri::HTML::DocumentFragment.parse(rich_text_attribute.body.to_html)
doc.css('a').each { |a| a['target'] ||= '_blank' }
doc.css("a").each { |a| a["target"] ||= "_blank" }
rich_text_attribute.body = doc.to_html
end
end