[wp-trac] [WordPress Trac] #27530: Anchor tag wrapped around div tag would add extra paragraph tag

WordPress Trac noreply at wordpress.org
Thu Jul 11 05:34:14 UTC 2019


#27530: Anchor tag wrapped around div tag would add extra paragraph tag
-------------------------------------+------------------------
 Reporter:  Klikerko                 |       Owner:  (none)
     Type:  defect (bug)             |      Status:  closed
 Priority:  normal                   |   Milestone:
Component:  Editor                   |     Version:  3.8.1
 Severity:  normal                   |  Resolution:  duplicate
 Keywords:  needs-testing has-patch  |     Focuses:
-------------------------------------+------------------------
Changes (by pento):

 * status:  new => closed
 * resolution:   => duplicate


Old description:

> (Wordpress version 3.9-Alpha 27111)
>
> This is HTML we added to our page editor:
>
> {{{
> <div><a href="#"><div>testing</div></a></div>
> }}}
>
> This is source result we are getting in browser:
>
> {{{
> <div><a href="#">
> <div>testing</div>
> <p></a></div>
> }}}
>
> For some reason '''<p>''' tag have been added. This happens every time
> block element is inside the anchor tag, we tried with '''<section>''' as
> well. When '''<span>''' is used instead all works fine.

New description:

 (WordPress version 3.9-Alpha 27111)

 This is HTML we added to our page editor:

 {{{
 <div><a href="#"><div>testing</div></a></div>
 }}}

 This is source result we are getting in browser:

 {{{
 <div><a href="#">
 <div>testing</div>
 <p></a></div>
 }}}

 For some reason '''<p>''' tag have been added. This happens every time
 block element is inside the anchor tag, we tried with '''<section>''' as
 well. When '''<span>''' is used instead all works fine.

--

Comment:

 Duplicate of #27350.

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


More information about the wp-trac mailing list