Hi,I use TT almost exclusively to produce XML (even if it's XHTML), and there's a small missing bit that's been annoying me: it has no built- in way of escaping XML's built-in entities. You can use the html filter but that will miss ' which is quite handy in attribute values; and you can't use the html_entities filter because that will also use entities such as é which will then have to be declared.
I'm not deeply involved with the TT community but I suspect that there is some level of understandable deterrence against adding too much stuff into the core, and I'll happily settle for making a module instead if it's rejected. But I strongly suspect that most people today either out of laziness or ignorance use the html filter in order to produce xml, which can lead to breakage (admittedly in rare cases, but I'd rather be defensively complete). Having this readily available will help there. Also, it's not really a new feature, just a teeny variant on an existing one — in fact the only reason I didn't change the html filter directly is because I was concerned it might break existing content.
Either way, tell me if you like it or not so I know if I have to go about it some other way :)
xml_filter.diff
Description: Binary data
-- Robin Berjon - http://berjon.com/ Feel like hiring me? Go to http://robineko.com/
_______________________________________________ templates mailing list [email protected] http://mail.template-toolkit.org/mailman/listinfo/templates
