Hi, 

I have a templatetag which decides somthing and returns it. I works well
within HTML, but it causes error while it is in JavaScript, because of
newline which is produced by django rendering this templatetag. 

For example: 
<img src="{% find_which_display photo %}" /> produces

<img src="http://media.xxxx.com/images/2010/01/22/test_image.jpg
" />

and yes it has newline but it works and display image.

But here: 
<script>
...
replacePhoto('{% find_which_display photo %}');
...
</script> produces

<script>
...
replacePhoto('http://media.xxxx.com/images/2010/01/22/test_image.jpg
');
...
</script>

and of course it fails. 

I am sure that my templatetag find_which_display does not produce this
newline, i tried and tested it, also I dont know who does and how I can
fix it.

Thanks for any help..

--
Ali Rıza Keleş 

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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