mirror of
https://github.com/funamitech/mastodon
synced 2024-12-18 16:48:37 +09:00
Fix crash in admin interface when viewing a remote user with verified links (#25796)
This commit is contained in:
parent
71d44949bf
commit
b6d173b459
@ -60,7 +60,7 @@ class TextFormatter
|
|||||||
suffix = url[prefix.length + 30..-1]
|
suffix = url[prefix.length + 30..-1]
|
||||||
cutoff = url[prefix.length..-1].length > 30
|
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>
|
<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
|
HTML
|
||||||
rescue Addressable::URI::InvalidURIError, IDN::Idna::IdnaError
|
rescue Addressable::URI::InvalidURIError, IDN::Idna::IdnaError
|
||||||
|
Loading…
Reference in New Issue
Block a user