[wp-trac] [WordPress Trac] #30847: wp_embed_register_handler() ignores hyperlinks

WordPress Trac noreply at wordpress.org
Fri Dec 26 18:43:04 UTC 2014


#30847: wp_embed_register_handler() ignores hyperlinks
---------------------------+-----------------------------
 Reporter:  paulschreiber  |      Owner:
     Type:  defect (bug)   |     Status:  new
 Priority:  normal         |  Milestone:  Awaiting Review
Component:  General        |    Version:  trunk
 Severity:  normal         |   Keywords:
  Focuses:                 |
---------------------------+-----------------------------
 When you paste a URL into a post, like so:
 {{{
     https://www.youtube.com/watch?v=jYlFN8euWtE
 }}}

 `wp_embed_register_handler()` will detect it and convert it to an embed:
 {{{
     <iframe width="610" height="343"
 src="https://www.youtube.com/embed/jYlFN8euWtE?feature=oembed"
     frameborder="0" allowfullscreen></iframe>
 }}}

 However, if you paste the link first into a Google doc or Word document,
 and then copy and past it in to WordPress, you end up with something like
 this:
 {{{
     <a href="https://www.youtube.com/watch?v=jYlFN8euWtE">
     https://www.youtube.com/watch?v=jYlFN8euWtE</a>
 }}}
 which `wp_embed_register_handler()` skips.

 It would be nice if that could be detected as an embed.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/30847>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list