Add <email> tag to obfuscate emails/strings for better bot protection #2578
No Reviewers
Labels
Clear labels
Accessibility
bug
build
cgi Scripting
design
disruptive
documentation
duplicate
easy
enhancement
feature-request
help wanted
javascript
priority/low
question
system-hackers
tagging
text
translations
wait/bugfix
wait/inprogress
wait/misc
wait/proofread
wontfix
xsl
Requires careful coordination and documentation changes
Improving what is already there
No labels
xsl
Milestone
No items
No Milestone
Assignees
albert (Albert Dengg)
alex.busch (alex.busch)
alex.sander (alex.sander)
anaghz (anaghz)
annarita.russo (annarita.russo)
ao (André Ockers)
bonnie (bonnie)
ciampix (Marco Ciampa)
cryptie (cryptie)
dario (dario)
delliott (Darragh Elliott)
dfajfer (Damian Fajfer)
dmaphy (Dominic Hopf)
doczkal (Thomas Doczkal)
eal (eal)
egnun (Erik Grun)
eventregbot (eventregbot)
fi (fi)
floriansnow (Florian Snow)
foxort (Tino Tempesta)
gabriel.ku (gabriel.ku)
guido (guido)
hf (hf)
hugo (hugo)
ineiev (ineiev)
jithendra (jithendra)
jn (jn)
jzarl (jzarl)
linus (Linus Sehn)
lucabon (Luca Bonissi)
lucas.lasota (lucas.lasota)
marcelo.fm (Marcelo)
max.mehl (Max Mehl)
mk (Matthias Kirschner)
monochromec (monochromec)
mweimann (Michael Weimann)
nico.rikken (nico.rikken)
patrick (Patrick Ohnewein)
reinhard (Reinhard Müller)
renovate-bot (Renovate Bot)
repentinus (Heiki Lõhmus)
schiessle (Björn Schießle)
silviarbgl (Silvia Rbgl)
sofiaritz (Sofía Aritz)
tobiasd (tobiasd)
vincent (vincent)
Clear assignees
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: FSFE/fsfe-website#2578
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Fixes #2484
This PR introduces a new tag
<email>that can be used everywhere to obfuscate email addresses. Right now, if you just writeme@example.com, even the dumbest bot that scrapes the website will find it and can spam you (or others).There are numerous techniques that one could use to avoid that. Many meanwhile make use of Javascript and fancy CSS rules, but they have at least one major downside: accessibility for people using screen readers is destroyed.
Therefore, I went with a mixture of decimal and hexadecimal codes. So within the
<email>tag, anabecomesa(hex) while anxbecomesx(dec). Some common characters even are just left as before. From my understanding, this does not affect screen readers but it should make it harder for script kiddie bots to un-scramble it.This is also usable in XSLT templates, most prominently on our team page. Commit
8d9d8d366edemonstrates this, while80d6e6e367shows the same in the simple form for XML files.Furthermore, you can automatically make it a clickable link with
mailto:. Such a tag may look like<email mailto="yes">me@example.com</email>. If you do not provide themailtoattribute or have another value thanyes, no link will be shown.This element could also be used for other things than email addresses, e.g. telephone numbers. However, since this is probably the most common use case, I kept it simple for editors.