see
http://www.djangoproject.com/documentation/templates/#automatic-html-escaping
adi
--
Adi J. Sieker mobile: +49 - 178 - 88 5 88 13
Freelance developer skype: adijsieker
SAP-Consultant web: http://www.sieker.info/profile
openbc: https://www.openbc.com/hp/AdiJoerg_Sieker/
>
>
> I'm working on my first Django project and I can't seem to get
> information printed out as I would like it. I'm trying to print out
> quotes to a page with the newlines turned into HTML <br> tags (similar
> to PHP's nl2br function). So far I've been able to do this using the
> __str__ function for the Quote model, but it escapes the tags into
> html entities that I see the tags in my browser instead of the line
> breaks. I'm using the development version of Django.
>
Hi Alex
AFAIK the Django dev version automatically escapes output unless you mark it
safe. Check the docs for more info.
--
-------------------------------------------------------------------
Tomás Garzón Hervás
Director de Desarrollo y Calidad IACTIVE Intelligent Solutions, S.L.
--
Teléfono Móvil: 646760508
--
Bussines & Innovation Center (BIC)
Parque tecnológico de ciencias de la salud
Avd. de la innovación 1
C.P. 18100 Armilla (Granada)
-------------------------------------------------------------------
Turning autoescaping on and off for large sections of a template is a
sort of sledgehammer approach. For specific variables, as the case
seems to be here, the "safe" filter is much more appropriate and
fine-grained.
--
"Bureaucrat Conrad, you are technically correct -- the best kind of correct."