Задать вопрос

Тел: +7 965 3737 888

461

Просмотров

1

Ответов

Email and phone templatetag obfuscator

Template tag to obfuscate emails and other spam sensitive information.

Usage

obfuscate 'my@email.here' 'Link display' 'Link title' obfuscate 'my@email.here' 'Link display' obfuscate 'phone number'

Renders complex xhmtl compliant javascript.

May need caching as it renders a new code every time.

Вопрос полезен? Да0/Нет0
file_2683.html(4.0Кб)
None

Ответы (1):

Ответskarphace:17.08.2011
Ответ полезен? Да0/Нет0

If you want this to work in template iteration, self.email, self.display, and self.title in ObfuscateNode.render() need to be converted to local vars.

For instance:

self.email = self.email.resolve(context).lower()

Becomes:

email = self.email.resolve(context).lower()