Laxmikant I think you didn't understand my point. I don't want it escaped, 
and escape marks it for escaping. I want to output the contents of database 
RAW, without escaping. Safe filter does this but I found the weird 
exception of &, what messes with urls with parameters on them.

Regards,
Marc Serra

El dimecres 3 d’octubre de 2012 6:25:38 UTC+2, Laxmikant Gurnalkar va 
escriure:
>
> >>>I have not used *safe*  ever. But use *escape* this works for me.
>
> On Wed, Oct 3, 2012 at 9:54 AM, Laxmikant Gurnalkar <
> laxmikant...@gmail.com <javascript:>> wrote:
>
>> Hi, 
>> I have not used *sace*  ever. But use *escape* this works for me.
>> https://docs.djangoproject.com/en/1.0/ref/templates/builtins/#escape
>>
>> Cheers
>> *Laxmikant G.*
>>
>>
>>
>> On Wed, Oct 3, 2012 at 4:06 AM, Marc Serra <mad...@gmail.com<javascript:>
>> > wrote:
>>
>>> Hi, i'm trying to output raw html content form the database on the 
>>> website, so i use the safe filter on the variable. All html code is 
>>> displayed correctly except the ampersand that are escaped ignoring the safe 
>>> filter, or It seems to me.
>>>
>>> I also tried to use a templatetag  with the mark_safe function with the 
>>> same outcome.
>>>
>>> Here an example:
>>>
>>> Source in database:
>>>
>>> <object width="560" height="340"><param name="movie" 
>>> value="http://www.youtube.com/v/Uq8zzBW9hlc&hl=en&fs=1&hd=1";></param><param 
>>> name="allowFullScreen" value="true"></param><param name="allowscriptaccess" 
>>> value="always"></param><embed 
>>> src="http://www.youtube.com/v/Uq8zzBW9hlc&hl=en&fs=1&hd=1"; 
>>> type="application/x-shockwave-flash" allowscriptaccess="always" 
>>> allowfullscreen="true" width="560" height="340"></embed></object>
>>>
>>> On template with |safe filter (notice "&" replacement with "&amp;"):
>>>
>>> <object height="340" width="560"><param name="movie" 
>>> value="http://www.youtube.com/v/Uq8zzBW9hlc&amp;hl=en&amp;fs=1&amp;hd=1 
>>> <http://www.youtube.com/v/Uq8zzBW9hlc&hl=en&fs=1&hd=1>"><param 
>>> name="allowFullScreen" value="true"><param name="allowscriptaccess" 
>>> value="always"><embed 
>>> src="http://www.youtube.com/v/Uq8zzBW9hlc&amp;hl=en&amp;fs=1&amp;hd=1 
>>> <http://www.youtube.com/v/Uq8zzBW9hlc&hl=en&fs=1&hd=1>" 
>>> type="application/x-shockwave-flash" allowscriptaccess="always" 
>>> allowfullscreen="true" height="340" width="560"></object>
>>>
>>>
>>> You know what can be the reason to this behaviour and how to solve it?
>>>
>>> Thank you,
>>> Marc Serra
>>>
>>>
>>>  -- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "Django users" group.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msg/django-users/-/M3FV3yY7JnoJ.
>>> To post to this group, send email to django...@googlegroups.com<javascript:>
>>> .
>>> To unsubscribe from this group, send email to 
>>> django-users...@googlegroups.com <javascript:>.
>>> For more options, visit this group at 
>>> http://groups.google.com/group/django-users?hl=en.
>>>
>>
>>
>>
>> -- 
>> * 
>>
>>  GlxGuru
>>
>> *
>>
>
>
>
> -- 
> * 
>
>  GlxGuru
>
> *
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/Yau7wHup5JoJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to