[wp-trac] [WordPress Trac] #2691: HTML comments in posts aren't handled properly.
WordPress Trac
wp-trac at lists.automattic.com
Sun Jan 3 00:43:17 UTC 2010
#2691: HTML comments in posts aren't handled properly.
---------------------------------+------------------------------------------
Reporter: gord | Owner: anonymous
Type: defect (bug) | Status: reopened
Priority: normal | Milestone: Future Release
Component: General | Version: 2.8.5
Severity: normal | Resolution:
Keywords: wpautop needs-patch |
---------------------------------+------------------------------------------
Comment(by vikingjs):
Replying to [comment:5 scribu]:
> The function responsible is called wpautop() and can be found in /wp-
includes/formatting.php
I took a look and I'm probably not the guy to be fixing this. As far as I
can tell the band-aid advised by random above is a good fix. The reason I
think I'm not the guy is because I don't know why stripslashes() and
clean_pre() are needed for a comment, so I bow to the superior
understanding of others.
random calls his patch a band-aid, but it would be just another in a long
list of band-aids in the function. The philosophy seems to be to add
paragraph tags and then go back and repair special cases where they broke
things. This would be just another special case. Ideally it would be
better simply not to apply the wpautop routines to comments (or some of
the other cases like embed tags) in the first place.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/2691#comment:6>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list