Page 1 of 1

Un Verb

Posted: Wed Jul 01, 2009 9:34 am
by gaurav.shetti
I know that the function <verb> works as follows

<verb>
<HTML>
$x
</verb>

will give the o/p as
<HTML>
$x

Now how do we convert them back to html tags .. like retrieve the former form.. Any function ?

Un Verb

Posted: Wed Jul 01, 2009 9:50 am
by jason112
The act of converting < and > to < and > is referred to as "html escaping". There are fmt flags for escaping and unescaping (%H and %!H, respectively).

This code
<$data="<html>">
<fmt "before: %s" $data>

<strfmt "%H" $data><$data=$ret>
<fmt "escaped: %s" $data>

<strfmt "%!H" $data><$data=$ret>
<fmt "unescaped: %s" $data>

produces:
before: <html>
escaped: <html>
unescaped: <html>

Un Verb

Posted: Wed Jul 01, 2009 10:45 am
by Kai
<verb noesc> will enter literal mode but without HTML-escaping, eg.:

<verb noesc>
<HTML>
$x
</verb>

will output:

<HTML>
$x