[wp-trac] [WordPress Trac] #8912: wptexturize malforms HTML comments that contain HTML tags

WordPress Trac wp-trac at lists.automattic.com
Wed Dec 14 13:04:29 UTC 2011


#8912: wptexturize malforms HTML comments that contain HTML tags
--------------------------+-----------------------------
 Reporter:  Otto42        |       Owner:  anonymous
     Type:  defect (bug)  |      Status:  reopened
 Priority:  normal        |   Milestone:  Future Release
Component:  Formatting    |     Version:  2.9.2
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |
--------------------------+-----------------------------
Changes (by ericaentertainment):

 * keywords:  has-patch needs-refresh needs-unit-tests => has-patch


Comment:

 I have a workaround. Just before the close comment tag, put ''another''
 open comment tag. That second open comment tag will be commented out, but
 it forces the close tag to be recognized and not be reformatted as an en-
 dash.

 Example that fails:
 <!-- <b> text </b> -->

 Example that works:
 <!-- <b> text </b> <!-- -->

 In other words, if you have comments that enclose other tags, just make
 sure the ''last'' tag is another open comment tag.

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


More information about the wp-trac mailing list