|
|
|
|
|
by traverseda
1383 days ago
|
|
Uhh, don't use the "safe" filter on user data that you're embedding in javascript, as that introduces arbitrary code injection attacks. As for the default representation not being flat like the author needed, you can use the "values_list" method on your queryset. I worry that articles like this lead to "the blind leading the blind". The arbitrary js injection attack enabled by their first example is concerning, and really should be accompanied by a big disclaimer saying "don't mess around with this filter unless you actually know what you're doing". |
|