Permalink
Browse files

replace obsolate method in URI. to new one.

  • Loading branch information...
yoosee committed Dec 26, 2017
1 parent 9743e64 commit 5f3b8ec45570a5f2b534957f81058b8db12a1b6b
Showing with 1 addition and 1 deletion.
  1. +1 −1 app/services/textfi_markdown.rb
@@ -39,7 +39,7 @@ def block_quote quote
if quote.gsub(/<[^>]+>/,'') =~ /^https?:\/\/twitter\.com[\S]+/
tw_width = 550
oembed_url = "https://publish.twitter.com/oembed?maxwidth=#{tw_width}&url="
req = oembed_url + URI.encode(quote.gsub(/<[^>]+>/,''))
req = oembed_url + URI.encode_www_form(quote.gsub(/<[^>]+>/,''))
res = JSON.parse(open(req).read)
return res['html']

0 comments on commit 5f3b8ec

Please sign in to comment.