Monks, I am doing a large number of find and replace operations using HTML::Treebuilder and HTML::Element. One place I have run into trouble is  . This isn't an html element, yet it isn't treated quite as text either. (Pseudoelement?) For instance:
use strict;
use warnings;
use HTML::Element;
use Test::More qw(no_plan);
my $element = HTML::Element->new('td', "class"=>"zwischanspalte");
$element->push_content(' ');
my $expected = '<td class="zwischanspalte"> </td>';
my $html = $element->as_HTML();
is($html, $expected);
output is
not ok 1
# Failed test (pseudoelement.pl at line 12)
# got: '<td class="zwischanspalte">&nbsp;</td>
# '
# expected: '<td class="zwischanspalte"> </td>'
1..1
# Looks like you failed 1 tests of 1.
How can I get this to work? Thanks!