You are viewing a plain text version of this content. The canonical link for it is here.
Posted to embperl@perl.apache.org by Angus Lees <gu...@switchonline.com.au> on 2000/11/28 05:33:57 UTC
escmode and OUT
OUT
This filehandle is tied to Embperl's output stream.
Printing to it has the same effect as using the [+ ... +]
block.
but if $escmode = 0, no input processing is done at all on data
printed through OUT..
(similarly when $escmode = 3, but you escape html characters. this may
be a feature tho, depending on exactly what you are wanting to escape
the tags from..)
(this is 1.3b7, i'm thinking its to do with the "allow binary data"
changes in 1.3b6)
--
- Gus
Re: escmode and OUT
Posted by Gerald Richter <ri...@ecos.de>.
> <form>
> [- $fdat{'x'} = 'I was processed by embperl'; -]
> <input type=text name=x value="[+ $fdat{'x'} +]">
> </form>
>
This is equal to
<form>
[- $fdat{'x'} = 'I was processed by embperl'; -]
<input type=text name=x>
</form>
Embperl automaticly inserts the value attribute is it finds a value in %fdat
Gerald
RE: escmode and OUT
Posted by Steve Wilder <st...@matrixInteractive.net>.
If I may be so bold, I believe the syntax your looking for is as follows:
<form>
[- $fdat{'x'} = 'I was processed by embperl'; -]
<input type=text name=x value="[+ $fdat{'x'} +]">
</form>
Steve Wilder
Matrix Interactive, Inc.
http://www.matrixinteractive.net/
Desk: 248.814.8235
Cell: 248.894.3128
Fax : 248.814.8236
-----Original Message-----
From: Gerald Richter [mailto:richter@ecos.de]
Sent: Wednesday, November 29, 2000 12:24 AM
To: Angus Lees; Embperl list
Subject: Re: escmode and OUT
>
> <form>
> [+
> $escmode = 0;
> $fdat{x} = 'I was processed by embperl';
> '<input type="text" name="x">';
> +]
> </form>
>
> the input tag is not processed by embperl, and thus it doesn't get the
> default "value=$fdat{x}" added.
>
The input tag will _never_ be processed to get the value form %fdat when
it's part of your output. The only thing that changes when changing $escmode
is with $escmode=0 you get
<input type="text" name="x">
with $escmode=3 you get
<input type="text" name="x">
The later one is display by the browser as text, where the first one is
interpreted by the browser as input tag.
NOTE: This behaviour occurs when you have set optRawInput, otherwise it gets
more complicated
>
> I can see why that behaviour is there, and it makes sense. tho the
> $escmode=0 docs only mention escaping special html characters, not
> disabling all parsing of html and [- -], etc blocks.
>
$escmode = 0 does _not_ disable any parsing, really only the escaping. If
you see anythingelse, it's a bug, but for me it works as expected.
> (heh, i think i found a way for neil to have files not processed by
> embperl. just use [- Execute({inputfile = '*', escmode = 0}) -] )
>
Therefor the above suggestion will not work
Gerald
-------------------------------------------------------------
Gerald Richter ecos electronic communication services gmbh
Internetconnect * Webserver/-design/-datenbanken * Consulting
Post: Tulpenstrasse 5 D-55276 Dienheim b. Mainz
E-Mail: richter@ecos.de Voice: +49 6133 925151
WWW: http://www.ecos.de Fax: +49 6133 925152
-------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org
Re: escmode and OUT
Posted by Gerald Richter <ri...@ecos.de>.
>
> <form>
> [+
> $escmode = 0;
> $fdat{x} = 'I was processed by embperl';
> '<input type="text" name="x">';
> +]
> </form>
>
> the input tag is not processed by embperl, and thus it doesn't get the
> default "value=$fdat{x}" added.
>
The input tag will _never_ be processed to get the value form %fdat when
it's part of your output. The only thing that changes when changing $escmode
is with $escmode=0 you get
<input type="text" name="x">
with $escmode=3 you get
<input type="text" name="x">
The later one is display by the browser as text, where the first one is
interpreted by the browser as input tag.
NOTE: This behaviour occurs when you have set optRawInput, otherwise it gets
more complicated
>
> I can see why that behaviour is there, and it makes sense. tho the
> $escmode=0 docs only mention escaping special html characters, not
> disabling all parsing of html and [- -], etc blocks.
>
$escmode = 0 does _not_ disable any parsing, really only the escaping. If
you see anythingelse, it's a bug, but for me it works as expected.
> (heh, i think i found a way for neil to have files not processed by
> embperl. just use [- Execute({inputfile = '*', escmode = 0}) -] )
>
Therefor the above suggestion will not work
Gerald
-------------------------------------------------------------
Gerald Richter ecos electronic communication services gmbh
Internetconnect * Webserver/-design/-datenbanken * Consulting
Post: Tulpenstrasse 5 D-55276 Dienheim b. Mainz
E-Mail: richter@ecos.de Voice: +49 6133 925151
WWW: http://www.ecos.de Fax: +49 6133 925152
-------------------------------------------------------------
Re: escmode and OUT
Posted by Angus Lees <gu...@switchonline.com.au>.
hmm.. just did a simple test and it seems i was wrong.
anyway, my boils down to this:
<form>
[+
$escmode = 0;
$fdat{x} = 'I was processed by embperl';
'<input type="text" name="x">';
+]
</form>
the input tag is not processed by embperl, and thus it doesn't get the
default "value=$fdat{x}" added.
(I know, i should probably be a using [$sub$] instead, but the html is
returned from a function in EMBPERL_OBJECT_HANDLER_CLASS)
I can see why that behaviour is there, and it makes sense. tho the
$escmode=0 docs only mention escaping special html characters, not
disabling all parsing of html and [- -], etc blocks.
(heh, i think i found a way for neil to have files not processed by
embperl. just use [- Execute({inputfile = '*', escmode = 0}) -] )
--
- Gus
Re: escmode and OUT
Posted by Gerald Richter <ri...@ecos.de>.
> OUT
>
> This filehandle is tied to Embperl's output stream.
> Printing to it has the same effect as using the [+ ... +]
> block.
>
> but if $escmode = 0, no input processing is done at all on data
> printed through OUT..
>
> (similarly when $escmode = 3, but you escape html characters. this may
> be a feature tho, depending on exactly what you are wanting to escape
> the tags from..)
>
> (this is 1.3b7, i'm thinking its to do with the "allow binary data"
> changes in 1.3b6)
>
Sorry, I don't understand where your problem is. Could you give us a short
example?
Gerald
-------------------------------------------------------------
Gerald Richter ecos electronic communication services gmbh
Internetconnect * Webserver/-design/-datenbanken * Consulting
Post: Tulpenstrasse 5 D-55276 Dienheim b. Mainz
E-Mail: richter@ecos.de Voice: +49 6133 925151
WWW: http://www.ecos.de Fax: +49 6133 925152
-------------------------------------------------------------