I'm sorry to bother you at such a busy time.
This is my first time to ask you a question.
I was creating an application on Django this time, but
When creating one page, save each HTML tag in MySQL and
When I tried to call it if necessary, the HTML tag did not appear valid and
Everything was printed as a string.
(It does not act as an HTML tag and the tag is displayed)
I couldn't find a particular answer to Google teacher, so I kept thinking about it.
I would appreciate it if you could tell me how to solve it.
Example)
Save to MySQL (model models.TextField()
)
<a href="http://hogehoge.com/" target="_blank">Hogehoge Secret</a>
↓
Call to HTML page from Django
<a href="http://hogehoge.com/" target="_blank">Hogehoge Secret</a>"
(Tags do not take effect and appear as is)
I think it is probably treated as a string including tags, but
HTML tags cannot be enabled
If {{data|safe}} instead of {{data}}} when calling HTML (template) side, it will be displayed without escape. What do you think?
Note: Django Template Language
© 2024 OneMinuteCode. All rights reserved.