Thank you for the reply. I ran into the situation because I wanted to copy the raw wikipedia markup of a wikipedia page, which does use "{{". I had trouble copying the browser formatted page. Possibly, there could be a special tag for that. Since the view accepts Python code, there is probably a nice work around. I will try some things and submit a hopefully clean suggestion.
On Jan 18, 6:46 am, Massimo Di Pierro <massimo.dipie...@gmail.com> wrote: > Because the {{ ....}} operator have precedence over everything else. > when web2py finds > > {{=PRE("{{this is a string}}"))} > > interprets it as > > OPEN{{ =PRE("{{this is a string CLOSE}} "))} > > when you want to put < and > in HTML you have to escape them with < > and > > > similarly if you want to put {{ and }} inside web2py views you have to > escape them. In your case the simples solution is: > > {{=PRE("{"+"{this is a string}"+}"))} > > On Jan 18, 7:59 am, davidjensen <davidjensen...@gmail.com> wrote: > > > > > > > > > It bombs onPRE,CODE, and nowXML > > > On Jan 18, 3:13 am, nils <n...@olofsson.tv> wrote: > > > > Hi, > > > Could you not use {{=XML(string...)}} > > > Regards, > > > Nils > > > On Jan 18, 2012 9:43 a.m., "davidjensen" <davidjensen...@gmail.com> wrote: > > > > > This is not recognized asa string: > > > > "{{this is a string}}" in: > > > > {{=PRE("{{this is a string}}"))} in a web page > > > > but it works on the command line: > > > > >>PRE("{{this is a string}}").xml()