lib/onebox/engine/twitter_status_onebox.rb in onebox-1.5.21 vs lib/onebox/engine/twitter_status_onebox.rb in onebox-1.5.22
- old
+ new
@@ -3,10 +3,11 @@
class TwitterStatusOnebox
include Engine
include LayoutSupport
include HTML
- matches_regexp Regexp.new("^http(?:s)?://(?:www\\.)?(?:(?:\\w)+\\.)?(twitter)\\.com(?:/)?(?:.)*/status(es)?/")
+ matches_regexp Regexp.new("^https?://(?:www\\.)?(?:(?:\\w)+\\.)?(twitter)\\.com(?:/)?(?:.)*/status(es)?/")
+ always_https
private
def match
@match ||= @url.match(%r{twitter\.com/.+?/status(es)?/(?<id>\d+)})