Найти - Пользователи
Полная версия: не работает addslashes фильтр в шаблоне
Начало » Django » не работает addslashes фильтр в шаблоне
1
maxbusko
помогите пожалуйста. не могу понять
не добавляется слэш перед двойными кавычками

{% for item in items %}
   {% autoescape off %}
       "text":"{{ new.text|addslashes }}"
   {% endautoescape %}
{% endfor %}

выводит - “text”:“Текст ”в кавычках“”
FishHook
{% autoescape off %}
        "text":"{{ "'xcxx\czxc'"|addslashes }}"
{% endautoescape %}

Выводит

“text”:“\'xcxx\\czxc\'”
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by DjangoBB