[wp-trac] [WordPress Trac] #38181: Add oEmbed support for Amazon Kindle Instant Previews

WordPress Trac noreply at wordpress.org
Mon Sep 18 22:09:53 UTC 2017


#38181: Add oEmbed support for Amazon Kindle Instant Previews
---------------------------------------------+--------------------------
 Reporter:  jsepia                           |       Owner:  johnbillion
     Type:  enhancement                      |      Status:  reviewing
 Priority:  normal                           |   Milestone:  4.9
Component:  Embeds                           |     Version:  4.7
 Severity:  normal                           |  Resolution:
 Keywords:  has-patch has-unit-tests commit  |     Focuses:
---------------------------------------------+--------------------------

Comment (by jsepia):

 Replying to [comment:45 rugved]:
 > Replying to [comment:43 johnbillion]:
 > > [attachment:38181.8.diff] is the format I'd like to use for this
 patch. Just need to confirm about switching to a specific list of allowed
 subdomains.
 > Sorry for the delayed response on this. Only "read|www" would not work
 for us since we have different subdomains per marketplace. Hence we had
 the regex. But if you feel strongly about having specific subdomains, then
 this is the list of all subdomains we need to define in there:
 > www, read, lesen, lire, leggi, leer, ler
 >
 > Please include these and let me know if you have any questions or
 concerns. Thanks!

 To add to Rugved's comment:

 We also need to support the `smile.` subdomain. The correct regexes for
 all supported subdomain/TLD combinations are:

 {{{
 '#https?://((read|leer|ler|smile|www)\.)?amazon\.(com|com\.mx|com\.br|ca)/.*#i'
 '#https?://((read|lesen|lire|leggi|leer|smile|www)\.)?amazon\.(co\.uk|de|fr|it|es|in|nl|ru)/.*#i'
 '#https?://((read|smile|www)\.)?amazon\.(co\.jp|com\.au)/.*#i'
 '#https?://((read|www)\.)?amazon\.cn/.*#i'
 }}}

 Here are some valid test cases:

 {{{
 http://amazon.com/dp/B000SEGUDE
 https://smile.amazon.com/dp/B00DPM7TIG
 https://smile.amazon.co.uk/dp/B00DPM7TIG
 https://smile.amazon.co.uk/dp/1476746583
 https://ler.amazon.br/?asin=B00DPM7TIG&kcrFree=only
 https://ler.amazon.br/kp/embed?asin=B00DPM7TIG
 https://lesen.amazon.de/?asin=B00DPM7TIG&kcrFree=only
 https://lesen.amazon.de/kp/embed?asin=B00DPM7TIG
 https://read.amazon.cn/?asin=B00DPM7TIG&kcrFree=only
 https://read.amazon.cn/kp/embed?asin=B00DPM7TIG
 }}}

--
Ticket URL: <https://core.trac.wordpress.org/ticket/38181#comment:46>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list