Prevent django admin from escaping html

As of Django 1.9, you can use format_html(), format_html_join(), or allow_tags in your method. See the list_display docs for more info. The code in the question using mark_safe will work. However a better option for methods like these might be format_html, which will escape arguments. def _get_thumbnail(self, obj): return format_html(u'<img src=”{}” />’, obj.admin_thumbnail.url) In earlier … Read more

How to safely output HTML from a PHP program?

You always want to HTML-encode things inside HTML attributes, which you can do with htmlspecialchars: <span title=”<?php echo htmlspecialchars($variable); ?>”> You probably want to set the second parameter ($quote_style) to ENT_QUOTES. The only potential risk is that $variable may already be encoded, so you may want to set the last parameter ($double_encode) to false.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)