[rt-users] Blank line in output affecting XML

Peterson, Erik epeterson at edc.org
Tue Jan 9 12:13:10 EST 2007


On 1/5/07 9:59 AM, "Peterson, Erik" <epeterson at edc.org> wrote:
> 
> Because no matter what I output, the declaration is starting on line 2 of
> the output.  Then I noticed that this happens on all pages, but HTML doesn't
> care as much that the doctype declaration or html element are on the very
> first line...  However, XML does.  If I save the file, kill the first line
> and reload it, it's fine.

After a bunch more searching, I found the problem (or at least a solution).

http://lists.fsck.com/pipermail/rt-devel/2004-January/005362.html

This thread mentions that the same problem cropped up when dealing with PNG
output and that the solution was to clear the Mason buffer before using
$m->out();

The line is just 

$m->clear_buffer();

Before outputting anything and all is right with the world.

Don't know if anyone else can use this, but figured it would be nice to
close the loop on this question.

Thanks,
Erik




More information about the rt-users mailing list