Login

Tag "protect"

Snippet List

Hide Emails

Example Usage in the template: <p>{{ email|hide_email }}<br /> {{ email|hide_email:"Contact Me" }}<br /> {% hide_email "[email protected]" %}<br /> {% hide_email "[email protected]" "John Smith" %}</p> {{ text_block|hide_all_emails|safe }} All hidden emails are rendered as a hyperlink that is protected by javascript and an email and name that are encoded randomly using a hex digit or a decimal digit for each character. Example of how a protected email is rendered: <noscript>(Javascript must be enabled to see this e-mail address)</noscript> <script type="text/javascript">// <![CDATA[ document.write('<a href="mai'+'lto:&#106;&#x6f;&#x68;&#x6e;&#x40;&#101;&#120;&#97;&#109;&#x70;&#108;&#x65;&#46;&#x63;&#111;&#109;">&#74;&#111;&#104;&#110;&#x20;&#83;&#x6d;&#x69;&#x74;&#104;</a>') // ]]></script>

  • email
  • hide
  • protect
Read More

Protect anti robots template tag

This code works like that in the Google Groups you see and when try to see an e-mail and it is like this "[email protected]" with a link to write a captcha code and see the true value. You can use it for anything you want: links, blocks of texts, block of HTML, etc. To use in your template, place the a code like this (remember to load the template tags file with a {% load file_name %} before): {% protectantirobots %} <a href="mailto: {{ office.email }}">{{ office.email }}</a> {% endprotectantirobots %} You can also use **django-plus** application to do this: [http://code.google.com/p/django-plus/](http://code.google.com/p/django-plus/)

  • captcha
  • security
  • protect
  • anti
  • robots
  • safe
Read More

2 snippets posted so far.