Copyright | © 2018 Mark Karpov |
---|---|
License | BSD 3 clause |
Maintainer | Mark Karpov <markkarpov92@gmail.com> |
Stability | experimental |
Portability | portable |
Safe Haskell | None |
Language | Haskell2010 |
Obfuscate email addresses.
Synopsis
- obfuscateEmail :: Text -> Extension
Documentation
This extension makes email addresses in autolinks be rendered as something like this:
<a class="protected-email" data-email="something@example.org" href="javascript:void(0)">Enable JavaScript to see this email</a>
You'll also need to include jQuery and this bit of JS code for the magic to work:
$(document).ready(function () { $(".protected-email").each(function () { var item = $(this); var email = item.data('email'); item.attr('href', 'mailto:' + email); item.html(email); }); });