Parser issue

0 views
Skip to first unread message

Anderson A. Meggiolaro

unread,
May 22, 2009, 6:56:18 PM5/22/09
to smarty-d...@googlegroups.com


$smarty=new Smarty();

$smarty->assign('encoding', 'ISO-8859-1');
$smarty->display('test.tpl');

and in the template:

<?xml version="1.0" encoding="{$encoding}"?>
<html>...

it should display:
<?xml version="1.0" encoding="ISO-8859-1"?>
<html>...

but shows :
<?xml version="1.0" encoding="{$encoding}"?>
<html>...



is that a known issue?


--
------------------------------------------------
Anderson A. Meggiolaro
Programador de TI
------------------------------------------------

Patrick

unread,
May 23, 2009, 6:25:03 AM5/23/09
to Smarty Developers
Smarty won't change your templates.
If you're new to smarty, read this http://smarty.net/sampleapp/sampleapp_p1.php

On 23 Mai, 00:56, "Anderson A. Meggiolaro" <ameggiol...@gmail.com>
wrote:

U.Tews

unread,
May 23, 2009, 6:49:50 AM5/23/09
to Smarty Developers
Yes you are right. The parser does not parse Smarty tags within the
XML tags. XML tags needed a special handling not to get interpreted as
PHP shorttag. For some reasion parsing Smarty tags inside the XML tag
got out of my focus.

I will try to fix it ASAP.

Uwe

On May 23, 12:56 am, "Anderson A. Meggiolaro" <ameggiol...@gmail.com>
wrote:

Patrick

unread,
May 23, 2009, 9:52:14 AM5/23/09
to Smarty Developers
Sorry, I should read it carefully before I post.

U.Tews

unread,
Jun 14, 2009, 9:12:31 AM6/14/09
to Smarty Developers
The parser does now allow smarty tags within XML tags.
Reply all
Reply to author
Forward
0 new messages