[wp-trac] [WordPress Trac] #43187: Add content filter to make target="_blank" always secure

WordPress Trac noreply at wordpress.org
Wed Jan 31 14:45:51 UTC 2018


#43187: Add content filter to make target="_blank" always secure
----------------------------------------+-----------------------------
 Reporter:  notnownikki                 |       Owner:
     Type:  enhancement                 |      Status:  reopened
 Priority:  normal                      |   Milestone:  Future Release
Component:  General                     |     Version:
 Severity:  normal                      |  Resolution:
 Keywords:  has-patch needs-unit-tests  |     Focuses:
----------------------------------------+-----------------------------

Comment (by notnownikki):

 Hmm, I used `shortcode_parse_atts` because that's how
 `wp_rel_nofollow_callback` does things, so I assumed that was safe to use.
 I can replace with a regex though, if needed.

 Yes, `target` can be a named window, creating it if it doesn't exist, so
 if `target` is set, this should happen. Will fix.

 And will add unit tests! Wanted to get initial feedback that I was going
 in the right direction with this, so thanks for taking a look :)

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


More information about the wp-trac mailing list