[wp-trac] [WordPress Trac] #61482: WordPress is adding rel="noopener" to code in normal texteditor

WordPress Trac noreply at wordpress.org
Sun Jun 23 11:35:24 UTC 2024


#61482: WordPress is adding rel="noopener" to code in normal texteditor
--------------------------+------------------------------
 Reporter:  neo2k23       |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  General       |     Version:  trunk
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:
--------------------------+------------------------------

Comment (by neo2k23):

 The problem is that it formats the code on saving of the content.  So if
 you have a shortcode like this


 {{{
 [text_flip textReplaceWith="HTML 5 Compatible|Has Superb PHP Coding|CCS3
 Compatible|Uses Minified CSS & Javascript|PHP7 Compatible|Has Excellent &
 Fast Support <a style='color:yellow;'
 href='https://mysupportforum.com'>Visit our Forum</a>"] WordPress
 Theme.[/text_flip]
 }}}

 That link inside the shortcode is altered on page save.  And since
 shortcodes work with "" for the parameters the code does not work anymore
 after saving the page as it is altered on save.

 The filter does not work as the shortcode does not work anymore.  The
 parameter becomes

 {{{
 [text_flip textReplaceWith="HTML 5 Compatible|Has Superb PHP Coding|CCS3
 Compatible|Uses Minified CSS & Javascript|PHP7 Compatible|Has Excellent &
 Fast Support <a style='color:yellow;' href='https://mysupportforum.com'
 rel="nooppener">Visit our Forum</a>"] WordPress Theme.[/text_flip]
 }}}

 and thus stops working.

 The code within the shortcode should not be altered on saving.  This looks
 like it is a bug.

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


More information about the wp-trac mailing list