[Html-widget] HTML Interpolation / Raw HTML

Sébastien Wagener sebastien.wagener at gmail.com
Tue Jul 11 22:17:52 CEST 2006


Hi,

Could anybody tell me how to disable the interpolation of html
characters for the content of some tags (e.g. for some <label>'s)? 

I had a look at HTML::ElementRaw and tried to integrate its behavior
into HTML::Widget by creating a copy of HTML::Widget::Element::Span
called HTML::Widget::Element::ElementRaw with the following containerize
method:

sub containerize {
    my ( $self, $w ) = @_;

    my $content = $self->content;
    my $e = HTML::ElementRaw->new;
    $e->push_content($content) if $content;

    return $self->container( { element => $e } );
}

Test Script:

my $w = HTML::Widget->new;
$w->element('ElementRaw', 'name')->content('<br/>');
print $w->process;

Result:

<form action="/" id="widget"
method="post"><fieldset><p></p></fieldset></form>

Somewhere the content of the ElementRaw tag is lost, as it just displays
<p></p>. But I've been lost at a manual trace. 
Any hints? 
I hope I am not trying something complicated which can be done in a
single line...

Sébastien




More information about the Html-widget mailing list