Re: textile does not replace &?
"Roberto Antonio Ferreira De Almeida" <[email protected]>
| Newsgroups | gmane.comp.web.pyblosxom.user |
|---|---|
| Message-ID | <[email protected]> |
Aslak Raanes said: > På 6. okt 2004 kl. 11:18 skrev Gábor Farkas: >> it seems that the textile pyblosxom plugin does not replace '&'. >> if i write a blog entry with the text "a&b", i get "a&b" in the html >> file. > I think Roberto De Almeida explained why in the latest release of > pytextile (...) Actually, I was wrong. :) I thought that ampersands shouldn't be escaped inside <pre> tags, because if you wrote "&" inside the <pre> it would be rendered literally as such. A simple test proved me wrong, and I found that the standards are very clear -- "&" should always be escaped as "&". I just released a new version of Pytextile (2.0.10) that _tries_ to escape unescaped ampersands. A regular expression is smart enough to not escape "&" as "&amp;", for example; it also handles numeric entities correctly as far as I can tell. Anyway, I would still recomend that if you want the textile plugin to generate valid XHTML, install either mx.Tidy or uTidyLib and set VALIDATE=1. You can set the flag on your config.py with the key config['txtl_validate']=1, or directly on the textile.py file. Regards, Roberto -- Roberto De Almeida <[email protected]> this email is: [ ] bloggable [ ] ask first [ ] private [x] nonsense ------------------------------------------------------- This SF.net email is sponsored by: IT Product Guide on ITManagersJournal Use IT products in your business? Tell us what you think of them. Give us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more http://productguide.itmanagersjournal.com/guidepromo.tmpl