Method (and limitations) described here: http://nadeausoftware.com/articles/2007/05/stop_spammer_email_harvesters_obfuscating_email_addresses
Created
September 22, 2017 02:29
-
-
Save ngsctt/db69ef8d9674c9413c6deb1f42eedee6 to your computer and use it in GitHub Desktop.
Using character entities to obfuscate email addresses on websites to prevent scraping, in Hugo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
baseURL: http://example.com/ | |
languageCode: en-US | |
title: Untitled | |
Params: | |
email: 'user@example.com' # user@example.com |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{{ $mailto := "mailto:" -}} | |
{{ $email := .Site.Params.email }} | |
<a {{ print "href=" $mailto $email | safeHTMLAttr }}>{{ safeHTML $email }}</a> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment