[wp-trac] [WordPress Trac] #9610: line breaks in functions.php result in invalid XML in RSS feed
WordPress Trac
wp-trac at lists.automattic.com
Mon Jul 27 16:46:47 UTC 2009
#9610: line breaks in functions.php result in invalid XML in RSS feed
--------------------------+-------------------------------------------------
Reporter: rmckillen | Owner:
Type: defect (bug) | Status: closed
Priority: normal | Milestone:
Component: XML-RPC | Version:
Severity: normal | Resolution: invalid
Keywords: |
--------------------------+-------------------------------------------------
Comment(by Denis-de-Bernardy):
Yes, but there's nothing one can do about it. A blank line is a blank
line. Some XML parsers and validators, however, don't play well with blank
lines inserted before the XML declaration. I'd suggest you complain with
Feedburner and the W3C on this one. :-)
Anyway, you can dodge the problem by issuing ob_start()/ob_end_clean()
statements before and after including wp-settings.php, from within your
wp-config.php file, at the risk of losing some plugin functionality if
anything tries to override WP on the init hook.
Apart from this, though, there truly is nothing that WP can do about it...
The XML that gets output is perfectly valid, and WP in itself inserts no
blank lines. If one gets added in a theme's functions.php file, well...
there really isn't much that can be done, is there? We wouldn't even be
able to tell the user without adding an output buffer in core... :-|
I'd have left it open pending dev feedback had filosofo not closed it
already. But I sincerely doubt it would have gotten fixed anyway...
Picture a function.php file or a plugin that bails on a request, and tries
to output something outside of WP depending on a $_GET parameter, and then
die. PHP 5.2 platforms would then return fatal errors if instantiated
objects are used on the shutdown hook, since the shutdown hook wouldn't be
declared yet with its ob_flush procedure.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/9610#comment:12>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list