perl-embperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew O'Brien" <andr...@oriel.com.au>
Subject RE: embedded HTML tags
Date Fri, 30 Apr 2004 02:54:36 GMT

> From: Sreeram_Bazaru@bankone.com [mailto:Sreeram_Bazaru@bankone.com] 
> Sent: Friday, 30 April 2004 4:36 AM
>
> Hello,
> I have a module which gets some data from a file and displays 
> that data. The problem is the data in the file contains some 
> embedded HTML tags such as <a href> and others. When I get 
> and display that data dynamically using embperl, the HTML 
> tags are not evaluated instead it is displaying the tags as 
> it is. How do I evaluate those HTML tags and display the result.

Sreeram,

If all you want to do is include the data in the page that is output,
you
need to tell embperl not to html-escape it when it prints it out. You
can
do this on the fly like so:

[+ local $escmode=0; $my_variable_with_html_data; +]

Have a look in the documentation for escmode for a fuller explanation.

If you want to process the HTML snippet with embperl (to fill in form
pieces, for example) as it is being printed out then:

[- Execute({input => \$my_variable_with_html_data, %other_execute_args})
-]

Again, the documentation for Execute will help you here.

Cheers,

Andrew

PS. This was for embperl 1.3.x

---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org


Mime
View raw message