[wp-trac] [WordPress Trac] #38055: <a href> tags disappear when switching from "Text" view to "Visual" view of Page Editor

WordPress Trac noreply at wordpress.org
Fri Mar 15 16:42:54 UTC 2019


#38055: <a href> tags disappear when switching from "Text" view to "Visual" view of
Page Editor
---------------------------+------------------------------
 Reporter:  chrisrelish    |       Owner:  (none)
     Type:  defect (bug)   |      Status:  reopened
 Priority:  normal         |   Milestone:  Awaiting Review
Component:  Editor         |     Version:  4.6.1
 Severity:  normal         |  Resolution:
 Keywords:  bulk-reopened  |     Focuses:
---------------------------+------------------------------

Comment (by slewisma):

 This is an issue for me as well. One site has a custom theme that is out
 of date and planned to be replaced. I hoped the issue only happened there
 but I tried it on other sites with Generatepress and Twentynineteen and
 same problem.

 <a> tags around <div> tags has been legitimate since HTML 5 and should be
 allowed.

 Here are two test cases:

 {{{
 <a href="https://youtu.be/whatever">
 <div class="somevideoclass">
 icon image, heading and description
 </div>
 </a>
 }}}

 The a tag pair and the div pair will be removed and replaced with  
 in visual editor

 {{{
 <a href="https://youtu.be/whatever"></a>
 <div class="somevideoclass">
 icon image, heading and description
 </div>
 }}}

 with some css to expand the a tag to cover the div, this gets removed in
 the visual editor.

 This is happening in WP 5.1.1

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


More information about the wp-trac mailing list