I'd love to round out the Template Toolkit docs by including a note on 
how to properly replace the following:

[% link = someobject.url %]  (where url is say http://site.com?oops)
[% linkText = 'Click me' %]
[% ahref = '<a href="' _ link _ '">' _ linkText _ '</a>' %]
[% bodyText = "Some text waiting for link insertion,  Click me" %]

[% bodyText.replace(linkText, ahref) %]

I would expect the output to be:

Some text waiting for link insertion,
<a href="http://site.com?oops";>Click me</a>

But the ? in the url seems to be triggering pattern matching stuffs.

Is there a way around this?

Thanks,

Tosh

-- 
McIntosh Cooey - Twelve Hundred Group LLC - http://www.1200group.com/

_______________________________________________
templates mailing list
[email protected]
http://mail.template-toolkit.org/mailman/listinfo/templates

Reply via email to