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

WordPress Trac noreply at wordpress.org
Thu Apr 14 16:17:32 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 redsweater):

 Replying to [comment:25 azaozz]:
 > This is a good place to use the "tests first" approach:
 > 1. Decide exactly what the code has to do:
 >  * Match an URL when it is on a separate line. The current code does
 this.
 >  * Match an URL when it is the only content of a `<p>` tag excluding the
 actual tag and possibly matching line breaks before/after.
 >  * Anything else?

 I had to skim back to find your comment supporting the idea that the bare,
 non-shortcode URL should only work inside <p> tags. I'm not sure I agree
 with this reasoning at face value. The idea that it's a "shortcut" that
 should only work in a handful of very explicit scenarios is at odds with
 the reasoning that it's "magic," provides user delight, and should work in
 as many cases as can be confidently confirmed as safe :) I object slightly
 to the suggestion that there is a right way and a wrong way to insert
 these links. If the "shortcut" is the wrong way, then maybe it should be
 removed entirely to avoid ambiguity about the behavior?

 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:
 https://core.trac.wordpress.org/ticket/25387?replyto=25#comment:2.

 At the very least I think a URL, standing alone on a line without
 paragraph tags is unambiguous enough to warrant receiving the treatment.

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


More information about the wp-trac mailing list