skip to navigation
skip to content

django-evade 0.1.3

A Django template filter application for numerically escaping characters in templates

Django Evade is a Django template filter application for numerically escaping characters in templates.

It’s just like escape, but forces every character to be escaped randomly into either a decimal or hexadecimal numeric character reference by using a combination of Unicode conversion and string formatting. Useful for obscuring mailto hyperlinks to prevent spammers from collecting email addresses. Inspired by a Django snippet.

“Evade” sounded like a more severe form of “escape.”

Install

$ pip install django-evade

Add to settings.py.

INSTALLED_APPS = [
    # ...
    'evade',
]

Usage

{% load evade_tags %}

{{ "me@example.com"|evade }}

One possible result:

me@example.com
 
File Type Py Version Uploaded on Size
django-evade-0.1.3.tar.gz (md5) Source 2017-07-17 3MB
django_evade-0.1.3-py2.py3-none-any.whl (md5) Python Wheel py2.py3 2017-07-17 5KB