1 year ago
#197292
bigla
Encoding mailto: fields with Lektor, email cloaking with Lektor
I want to "encode" mailto: fields on my web-page using Javascript to avoid SPAM. (This is also known as Email cloaking.)
I saw some implementation of this Idea here.
Now I'd like to add this mail address obfuscation functionality to the lektor admin interface.
Where (lektor-framework-wise) and how (plugin, addon, template, flowblock, type) would be the simplest way to achieve this?
I imagine an available (flow-)block in the admin interface with fields where I could enter:
- the mail address as a string (which will be encoded) and
- an additional replacement string (which would be rendered on the webpage). The string shall be decoded "on click" only - on mouseover I see
(javascript:linkTo_UnCryptMailto('nbjmup;kvfshfoAkvnl/ef'));
Building the page with lektor should yield no plaintext e-mail addresses. And preferably enable the user to add it to a paragraph "inline".
I am also open to recommendations regarding better ways to avoid spam while enabling someone to contact you via e-mail.
jinja2
mailto
email-spam
lektor
0 Answers
Your Answer