[wp-trac] [WordPress Trac] #25387: Autoembeds don't work with paragraphs

WordPress Trac noreply at wordpress.org
Thu Apr 14 17:59:52 UTC 2016


#25387: Autoembeds don't work with paragraphs
-------------------------------------------+------------------
 Reporter:  Looimaster                     |       Owner:
     Type:  defect (bug)                   |      Status:  new
 Priority:  normal                         |   Milestone:  4.6
Component:  Embeds                         |     Version:  3.6
 Severity:  normal                         |  Resolution:
 Keywords:  has-patch needs-testing early  |     Focuses:
-------------------------------------------+------------------

Comment (by azaozz):

 > ...(this) should work in as many cases as can be confidently confirmed
 as safe
 >I think the shortcut is a good user experience, and to that end I would
 refer back to my original comments where I outlined some other situations
 where I think it should work

 Right, that's the main reason why I think we should set up how this should
 work exactly, and that it is a good idea to make all tests first, then
 code it.

 Currently (and for the last three years) this "shortcut" requires that the
 users paste (or type?) an "embeddable" URL on its own line. Because of
 wpautop, spaces and tabs (but not `\n`) before and after the URL are
 stripped and ignored. However this doesn't work when autop is disabled or
 when the URL is wrapped in (any) tags.

 The examples in https://core.trac.wordpress.org/ticket/25387#comment:2 are
 all cases where this should work (although the first one is a bit odd):

 {{{
 <p>
 http://www.wordpress.org/
 </p>

 <p>http://www.wordpress.org/</p>

 Some text
 http://www.wordpress.org/
 Some more text

 <p> http://www.wordpress.org/</p>
 <p>http://www.apple.com/ </p>
 http://www.red-sweater.com/

 http://www.wordpress.org/
 }}}

 Thinking we can also explore some even less common cases like the URL is
 in a <div> or perhaps <li>.

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


More information about the wp-trac mailing list