Page 1 of 1

documents containing shell code

Posted: Tue Jan 11, 2005 10:10 am
by Guest
Hi all,

Wow, nice CMS!

Some problems remain, though. When I try to insert a document containing shell code like

Code: Select all

awk '$2 ~ /^f$/ {print $NF}'
I get the followinfg error in error_log:

Code: Select all

PHP Fatal error:  Smarty error: [in preview:cmspreviewwZxa7c line 282]: syntax error: invalid attribute name: '$NF' (Smarty_Compiler.class.php, line 1510) in /data/htdocs/cmsmadesimple-0.8.1/lib/smarty/Smarty.class.php on line 1088, referer: http://webserver/cms/admin/editcontent.php
I presume it has something to do with the curly brackets, but I'm not sure how to solve this.

Any suggestions?

Thanks

Peter

documents containing shell code

Posted: Tue Jan 11, 2005 10:26 am
by Ted
Try:

Code: Select all

{literal}awk '$2 ~ /^f$/ {print $NF}'{/literal}

Re: documents containing shell code

Posted: Tue Jan 11, 2005 10:59 am
by Peter
{literal}{/literal} does the trick.

Thanks a lot.

Peter