Hi.

I've just stumbled on an error in the Midgard Manual on the web-site in
this page:

http://www.midgard-project.org/req/midgard-1.4/syntaxaddition.htm

Unfortunalety I can't add an annotation to the page so I'll just post it
here:


The described formatters do work differently as described, at least in the
recent CVS versions I've been using:


Formatter h:
------------
Does _not_ escape "&<>, it leaves it as-is since they are HTML control
characters. Other non HTML characters like the German-Umlauts will be
escaped though. Use this if you don't want to call htmlentities() all the
time.


Formatter H:
------------
This one does no longer exist!!! The parser will return an error if you
try to use it. Instead, just omit the formatter specifier [&(variable);]
to get this:

Its behavoir is escaping everything HTML conformant, including "&<>. This
one is good for inserting small bits of Code like last modified dates or
so where you don't want to worry about HTML encoding and you're sure that
there are not HTML control sequences in it.


Formatter p:
------------
I'm pretty sure that this one also does _not_ escape "&<> since it has to
execute PHP code with allowed HTML embedding. Also it will _not_ encode
other HTML chars like :h does. You have to do this yourself by using the
proper HTML Escapes or htmlentities() inside the displayed variable.


This should get into the manual, because it can (and has) led to a fair
amount of confusion...


Live long and prosper!
Torben Nehmer

-- 
ICQ-ID : 14148813 --- E-Mail : [EMAIL PROTECTED]
WWW    : http://www.nathan-syntronics.de --- http://www.nehmer.net



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to