I am hoping someone here might be able to suggest a workaround for a small problem I am having with the Clickable plugin. I want to filter some text, e.g. the body of an email message to turn it into HTML and make the embedded URLs into proper HTML links. The plugin does this well with one gotcha, people often send URLs in the form:
<http://www.template-toolkit.org/> as suggested in RFC 2396 Appendix E. URI::Find and the clickable plugin handle this form, but not quite as I want them to. [% USE Clickable -%] [% FILTER clickable -%] <http://www.template-toolkit.org/> [%- END %] gives: <a href="http://www.template-toolkit.org/"><http://www.template-toolkit.org/></a> so, the href is fine but there's those less-than, and greater-than characters in the text, which is bad for HTML viewing. If I HTML filter them first so the input text is effectively like: <http://www.template-toolkit.org/> I get this output: <<a href="http://www.template-toolkit.org/>">http://www.template-toolkit.org/></a>; so the URL is now wrong. If I did the Clickable filter and then filtered any special HTML characters I would get something like: <a href="http://www.template-toolkit.org/"><http://www.template-toolkit.org/></a> Which I really do not want. Any thoughts on how to get around this problem? Thanks in advance, Stephen Quinney _______________________________________________ templates mailing list [email protected] http://lists.template-toolkit.org/mailman/listinfo/templates
