[wp-testers] RE: wp_kses kills <!--more--> tags from xmlrpc posted
entries
Toby Simmons
toby at simmonsconsulting.com
Thu Dec 22 22:53:24 GMT 2005
I've updated the ticket (http://trac.wordpress.org/ticket/2130) to include a
proposed patch (suggested in November in the forums at
http://mu.wordpress.org/forums/topic/450):
Index: wp-includes/kses.php
===================================================================
--- wp-includes/kses.php (revision 3332)
+++ wp-includes/kses.php (working copy)
@@ -98,6 +98,10 @@
return '>';
# It matched a ">" character
+ if (preg_match('%^<!--[^>-]+-->$%', $string))
+ return $string;
+ # Allow HTML comments
+
if (!preg_match('%^<\s*(/\s*)?([a-zA-Z0-9]+)([^>]*)>?$%', $string,
$matches))
return '';
# It's seriously malformed
___________________________________
W. Tobias Simmons
Simmons Consulting, Web Design and Marketing
toby at simmonsconsulting.com
http://www.simmonsconsulting.com
Phone: 501.821.4230 / Fax: 501.244.4416
More information about the wp-testers
mailing list