Legend:

For some reason, there are a quite a few plugins that output white space which breaks xml parsing in all browsers. I keep coming across this problem in both ms-files.php and now the send method of the WP_Ajax_Response class so I just added ob_clean to the method in order to prevent plugins from being able to inadvertently break functionality in wordpress. I read up on ticket #14730 and I understand the viewpoint that ob_clean should not be used to cover the mistakes of plugin authors. However, finding unnecessary output in a plugin and contacting the author every time I come across this issue (which seems to happen often) seems counter-productive when users can be protected from such mistakes with a one-liner.

1

For some reason, there are a quite a few plugins that output white space which breaks xml parsing in all browsers or breaks file output. I keep coming across this problem in both ms-files.php and now the send method of the WP_Ajax_Response class so I just added ob_clean to the method in order to prevent plugins from being able to inadvertently break functionality in wordpress. I read up on ticket #14730 and I understand the viewpoint that ob_clean should not be used to cover the mistakes of plugin authors. However, finding unnecessary output in a plugin and contacting the author every time I come across this issue (which seems to happen often) seems counter-productive when users can be protected from such mistakes with a one-liner.