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

WordPress Trac noreply at wordpress.org
Fri Jan 17 07:31:31 UTC 2014


#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.7
 Severity:  normal                   |  Resolution:
 Keywords:  has-patch needs-refresh  |
-------------------------------------+-----------------------------
Changes (by nacin):

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


Comment:

 We already "disable" wptexturize() when we experience certain shortcodes
 and tags. If we added support for HTML comments — disable texturize when
 we see `<!--`, re-enable it after `-->` — I think that'd solve our
 problems and shouldn't be too much of a nightmare to implement.

 An alternative, cheap fix would be to not do the `'--'` em-dash
 replacement if the next character is `>`. We'd never want an em-dash
 there.

 [17636] made this patch stale.

 Removing needs-unit-tests as some exist, though more would of course be
 nice.

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


More information about the wp-trac mailing list