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

WordPress Trac noreply at wordpress.org
Thu Oct 19 20:37:31 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):

 Can you clarify here @niallhotfoot? I'm confused where you mention the
 leading whitespace. Is the problem that when there are no existing `rel`
 values, the new value is ` noopener nofollow` and that fails in the
 browser?

 It would be helpful to have a couple examples showing when this is right
 and when this is wrong and how the browser handles it. Based on the HTML
 specification I wouldn't expect extra spaces to cause any trouble, but I
 can definitely believe that they do; I'm not sure how to confirm and test
 it though.

 Also noted, that `esc_attr()` doesn't belong there within the HTML API
 calls. Values are properly escaped by `set_attribute()`, but that's not
 related to this ticket.

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


More information about the wp-trac mailing list