Hi Roman

Since a significant part of your action string is hard-coded, you might consider something like this instead?

In your code:

$template->formAction = "?admin_area=events&req=$formAction";

In your template, use the structure keyword to indicate to PHPTAL that the variable output should not be escaped:

tal:attributes="action structure formAction"

By the way, I always prefer that my query string ampersands get encoded. It's (more) valid (X)HTML to have a url like this:

http://example.com?key1=value1&key2=value2

Read more about the structure keyword in the manual: http://phptal.motion-twin.com/manual/en/#tales-structure

That's just my 2 cents.

Kind Regards,
Werner

romtek wrote:
Hi,

In my template I have the following: tal:attributes="action string:?admin_area=events&req=${formAction}" as a part a form tag. When the template gets rendered, I get the ampersand encoded. This isn't a problem as the browsers interpret this fine, but I'd like to get a real ampersand instead of the encoded version. Is there a way to do this?

Thanks

Roman
------------------------------------------------------------------------

_______________________________________________
PHPTAL mailing list
PHPTAL@lists.motion-twin.com
http://lists.motion-twin.com/mailman/listinfo/phptal

_______________________________________________
PHPTAL mailing list
PHPTAL@lists.motion-twin.com
http://lists.motion-twin.com/mailman/listinfo/phptal

Reply via email to