Beefy Boxes and Bandwidth Generously Provided by pair Networks Frank
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^2: How do I create non-breaking space (  ) with HTML::Element?

by tphyahoo (Vicar)
on Aug 08, 2005 at 09:52 UTC ( [id://481881]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to Re: How do I create non-breaking space (  ) with HTML::Element?
in thread How do I create non-breaking space (  ) with HTML::Element?

Thanks foxcub, that did the trick. I just had to delete whitespace to pass the test :)
use strict; use warnings; use HTML::Element; use Test::More qw(no_plan); my $literal = HTML::Element->new('~literal', 'text' => '&nbsp;' ); my $element = HTML::Element->new('td', "class"=>"zwischanspalte"); $element->push_content($literal); my $expected = '<td class="zwischanspalte">&nbsp;</td>'; my $html = $element->as_HTML(); $html =~ s/[\r\n]//; is($html, $expected);
  • Comment on Re^2: How do I create non-breaking space (&nbsp; ) with HTML::Element?
  • Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://481881]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.