~cytrogen/masto-fe

b6d173b4598db3e4c4b8f78f100d39dcb5e71f31 — Claire 2 years ago 71d4494
Fix crash in admin interface when viewing a remote user with verified links (#25796)

1 files changed, 1 insertions(+), 1 deletions(-)

M app/lib/text_formatter.rb
M app/lib/text_formatter.rb => app/lib/text_formatter.rb +1 -1
@@ 60,7 60,7 @@ class TextFormatter
      suffix      = url[prefix.length + 30..-1]
      cutoff      = url[prefix.length..-1].length > 30

      <<~HTML.squish
      <<~HTML.squish.html_safe # rubocop:disable Rails/OutputSafety
        <a href="#{h(url)}" target="_blank" rel="#{rel.join(' ')}" translate="no"><span class="invisible">#{h(prefix)}</span><span class="#{cutoff ? 'ellipsis' : ''}">#{h(display_url)}</span><span class="invisible">#{h(suffix)}</span></a>
      HTML
    rescue Addressable::URI::InvalidURIError, IDN::Idna::IdnaError