[wp-trac] [WordPress Trac] #47514: Change priority of make_clickable callback to boost performance

WordPress Trac noreply at wordpress.org
Tue Jun 11 18:31:42 UTC 2019


#47514: Change priority of make_clickable callback to boost performance
-------------------------+------------------------------
 Reporter:  olliverh87   |       Owner:  (none)
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Awaiting Review
Component:  Comments     |     Version:  5.2.1
 Severity:  minor        |  Resolution:
 Keywords:               |     Focuses:  performance
-------------------------+------------------------------

Comment (by SergeyBiryukov):

 Hi @olliverh87, welcome to WordPress Trac! Thanks you for the detailed
 problem description.

 > Since the `<a>` tags are properly generated by WP itself, there is no
 reason to have it run through functions such as force_balance_tags.

 What if there's an unclosed link in the comment, e.g. if the commenter
 forgot to close the `<a>` tag?
 {{{
 <a href="#" rel="nofollow">test

  ftp.x
 }}}

 Without the patch, the first link is properly closed before the second one
 is opened (even though there are extra `</p><p>` tags in between:
 {{{
 <p><a href="#" rel="nofollow">test</p>
 <p> </a><a href="http://ftp.x" rel="nofollow">http://ftp.x</a></p>
 }}}

 With the patch, the links are nested, causing invalid markup:
 {{{
 <p><a href="#" rel="nofollow">test</p>
 <p> <a href="http://ftp.x" rel="nofollow">http://ftp.x</a></a></p>
 }}}

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


More information about the wp-trac mailing list