lib/onebox/engine/amazon_onebox.rb in onebox-1.5.49 vs lib/onebox/engine/amazon_onebox.rb in onebox-1.5.50
- old
+ new
@@ -6,10 +6,10 @@
include Engine
include LayoutSupport
include HTML
always_https
- matches_regexp(/^https?:\/\/(?:www\.)?(amazon|amzn)\.(?<tld>com|ca|de|it|es|fr|co\.jp|co\.uk|cn|in|com\.br)\//)
+ matches_regexp(/^https?:\/\/(?:www\.)?(?:smile\.)?(amazon|amzn)\.(?<tld>com|ca|de|it|es|fr|co\.jp|co\.uk|cn|in|com\.br)\//)
def url
if match && match[:id]
return "https://www.amazon.#{tld}/gp/aw/d/#{URI::encode(match[:id])}"
end