[wp-trac] [WordPress Trac] #59682: Bug fix for rel attributes in social-link.php

WordPress Trac noreply at wordpress.org
Mon Oct 30 14:36:15 UTC 2023


#59682: Bug fix for rel attributes in social-link.php
--------------------------+------------------------------
 Reporter:  niallhotfoot  |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  General       |     Version:  6.3.2
 Severity:  normal        |  Resolution:
 Keywords:  needs-patch   |     Focuses:
--------------------------+------------------------------

Comment (by dmsnell):

 > I'm able to run that in a wordpress view file

 @niallhotfoot I think this confirms that there's some other filtering
 going on. I pasted that code into my shell and got what I expected.

 {{{
 <li><a rel=" noopener nofollow" target="_blank" href="" class=""></a></li>
 }}}

 if you have any plugins installed can you try disabling those and see if
 you still lose the `rel`? I looked further in Core but I'm unable to find
 anything that matches `['"](?:noopener|nofollow)` which I would expect,
 given the behavior you're reporting.

 of note, having code run in a view function is different than running in
 isolation. there are going to be filters applied to the output of that
 view function, which is where I suspect that this `rel` is being removed.

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


More information about the wp-trac mailing list