Fixed bug that timeline can not be displayed by InvalidURIError (#2947)
This commit is contained in:
parent
2fba94b36e
commit
08e94d1b19
2 changed files with 9 additions and 0 deletions
|
@ -92,6 +92,8 @@ class Formatter
|
|||
rel: 'nofollow noopener',
|
||||
}
|
||||
Twitter::Autolink.send(:link_to_text, entity, link_html(entity[:url]), normalized_url, html_attrs)
|
||||
rescue Addressable::URI::InvalidURIError
|
||||
encode(entity[:url])
|
||||
end
|
||||
|
||||
def link_to_mention(entity, mentions)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue