in reply to How do I create non-breaking space ( ) with HTML::Element?
For me chr(160) is handier then using ~literal etc. as it can easily combined in strings.use strict; use warnings; use HTML::Element; use Test::More qw(no_plan); my $nbsp = chr(160); my $element = HTML::Element->new_from_lol( ['td', {"class"=>"zwischanspalte"}, $nbsp] ); my $expected = '<td class="zwischanspalte"> </td>'; my $html = $element->as_HTML(); is($html, $expected);
|
|---|