[wp-trac] [WordPress Trac] #23756: make_clickable should not convert the URLs in pre, code tags

WordPress Trac noreply at wordpress.org
Wed Nov 13 22:09:15 UTC 2013


#23756: make_clickable should not convert the URLs in pre,code tags
-------------------------------------------------+-------------------------
 Reporter:  alex-ye                              |       Owner:
     Type:  defect (bug)                         |  wonderboymusic
 Priority:  normal                               |      Status:  closed
Component:  Formatting                           |   Milestone:  3.8
 Severity:  normal                               |     Version:  3.5.1
 Keywords:  has-patch needs-testing has-unit-    |  Resolution:  fixed
  tests commit                                   |
-------------------------------------------------+-------------------------

Comment (by nbachiyski):

 There is some prior art of not mangling certain parts of the HTML in
 `wptexturize()`. Look at the bottom of the function. It handles more cases
 – some shortcodes (code), more tags (kbd, style, script, tt), handles some
 invalid HTML cases, supports filtering the disabled tags/shortcodes.

 It’d be great if the logic for the two can be consolidated, because for
 example now `make_clickable` will convert URLs in script tags and in
 shortcodes.

 if anybody else is excited, I’d be happy to help.

 P.S. I wrote the older code, but I’m pretty embarrassed of functions like
 `_wptexturize_pushpop_element` :-)

--
Ticket URL: <http://core.trac.wordpress.org/ticket/23756#comment:25>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list