From 64b3307d42d39d779de1dfe7631f1aa81400e5ff Mon Sep 17 00:00:00 2001
From: Marco Balmer <micressor@secure.mailbox.org>
Date: Sat, 8 Dec 2018 17:39:49 +0100
Subject: [PATCH] Hide emails from spam bots

Found a interessting solution: https://stackoverflow.com/questions/483212/effective-method-to-hide-email-from-spam-bots#10300743
---
 assets/css/styles.css                             |  5 +++++
 content/hiring/2018-05-java-developer.md          |  5 +++--
 content/hiring/2018-05-usability-consultant.md    |  5 +++--
 content/hiring/2018-05-ux-designer.md             |  5 +++--
 content/news/2017-beta-released-security-audit.md | 10 ++++++----
 content/news/2018-1.0-released-new-funding.md     | 10 ++++++----
 content/news/2018-briar-1.1-released.md           | 10 ++++++----
 content/page/about.md                             |  5 +++--
 content/page/download.md                          |  4 +++-
 content/page/get-involved.md                      |  4 +++-
 content/page/hiring.md                            |  5 +++--
 content/page/privacy.md                           |  4 +++-
 themes/briar/layouts/shortcodes/hidingemail.html  |  2 ++
 13 files changed, 49 insertions(+), 25 deletions(-)
 create mode 100644 themes/briar/layouts/shortcodes/hidingemail.html

diff --git a/assets/css/styles.css b/assets/css/styles.css
index 2a96477..cdd45ec 100644
--- a/assets/css/styles.css
+++ b/assets/css/styles.css
@@ -499,6 +499,11 @@ figcaption {
     *line-height:1.3em;
 }
 
+span.reverse {
+  unicode-bidi: bidi-override;
+  direction: rtl;
+}
+
 @media only screen and (max-width:48em) {
     #wrapper {margin-bottom:-5em;}
 
diff --git a/content/hiring/2018-05-java-developer.md b/content/hiring/2018-05-java-developer.md
index db980f9..db8bdd2 100644
--- a/content/hiring/2018-05-java-developer.md
+++ b/content/hiring/2018-05-java-developer.md
@@ -4,8 +4,9 @@ date: 2018-05-01T00:00:00+01:00
 ---
 
 Sorry, this position is no longer available. If you'd like to hear about
-future vacancies, please email <contact@briarproject.org> \[[PGP
-key](/keys/contact.asc)\].
+future vacancies, please email {{<hidingemail
+  email="gro.tcejorprairb@tcatnoc"
+  pgplink="/keys/contact.asc" >}}.
 
 If you're interested in getting involved as a volunteer, please [join
 the development mailing
diff --git a/content/hiring/2018-05-usability-consultant.md b/content/hiring/2018-05-usability-consultant.md
index 9fb25b1..d2c7df2 100644
--- a/content/hiring/2018-05-usability-consultant.md
+++ b/content/hiring/2018-05-usability-consultant.md
@@ -4,8 +4,9 @@ title: Usability Consultant
 ---
 
 Sorry, this position is no longer available. If you'd like to hear about
-future vacancies, please email <contact@briarproject.org> \[[PGP
-key](/keys/contact.asc)\].
+future vacancies, please email {{<hidingemail
+  email="gro.tcejorprairb@tcatnoc"
+  pgplink="/keys/contact.asc" >}}.
 
 If you're interested in getting involved as a volunteer, please [join
 the development mailing
diff --git a/content/hiring/2018-05-ux-designer.md b/content/hiring/2018-05-ux-designer.md
index aa090b2..c1ee85f 100644
--- a/content/hiring/2018-05-ux-designer.md
+++ b/content/hiring/2018-05-ux-designer.md
@@ -4,8 +4,9 @@ title: UX Designer
 ---
 
 Sorry, this position is no longer available. If you'd like to hear about
-future vacancies, please email <contact@briarproject.org> \[[PGP
-key](/keys/contact.asc)\].
+future vacancies, please email {{<hidingemail
+  email="gro.tcejorprairb@tcatnoc"
+  pgplink="/keys/contact.asc" >}}.
 
 If you're interested in getting involved as a volunteer, please [join
 the development mailing
diff --git a/content/news/2017-beta-released-security-audit.md b/content/news/2017-beta-released-security-audit.md
index 283a788..c1738f8 100644
--- a/content/news/2017-beta-released-security-audit.md
+++ b/content/news/2017-beta-released-security-audit.md
@@ -89,10 +89,12 @@ Fund](https://www.opentech.fund).
 
 ### Contact
 
-Torsten Grote &lt;<t@grobox.de>&gt; \[[PGP
-key](https://grobox.de/gpg/0x74DCA8A36C52F833.asc)\]
+Torsten Grote {{<hidingemail
+  email="<gro.tcejorprairb@netsrot>"
+  pgplink="https://grobox.de/gpg/0x74DCA8A36C52F833.asc" >}}
 
-Michael Rogers &lt;<contact@briarproject.org>&gt; \[[PGP
-key](/keys/contact.asc)\]
+Michael Rogers{{<hidingemail
+  email="gro.tcejorprairb@tcatnoc"
+  pgplink="/keys/contact.asc" >}}
 
 [@BriarApp](https://twitter.com/BriarApp)
diff --git a/content/news/2018-1.0-released-new-funding.md b/content/news/2018-1.0-released-new-funding.md
index 4040eb7..20dede6 100644
--- a/content/news/2018-1.0-released-new-funding.md
+++ b/content/news/2018-1.0-released-new-funding.md
@@ -87,10 +87,12 @@ Fund](https://www.opentech.fund).
 
 ### Contact
 
-Torsten Grote &lt;<t@grobox.de>&gt; \[[PGP
-key](https://grobox.de/gpg/0x74DCA8A36C52F833.asc)\]
+Torsten Grote {{<hidingemail
+  email="<gro.tcejorprairb@netsrot>"
+  pgplink="https://grobox.de/gpg/0x74DCA8A36C52F833.asc" >}}
 
-Michael Rogers &lt;<contact@briarproject.org>&gt; \[[PGP
-key](/keys/contact.asc)\]
+Michael Rogers{{<hidingemail
+  email="gro.tcejorprairb@tcatnoc"
+  pgplink="/keys/contact.asc" >}}
 
 [@BriarApp](https://twitter.com/BriarApp)
diff --git a/content/news/2018-briar-1.1-released.md b/content/news/2018-briar-1.1-released.md
index 8cef898..0009a0e 100644
--- a/content/news/2018-briar-1.1-released.md
+++ b/content/news/2018-briar-1.1-released.md
@@ -86,10 +86,12 @@ Fund](https://prototypefund.de/).
 
 ### Contact
 
-Torsten Grote &lt;<torsten@briarproject.org>&gt; \[[PGP
-key](https://grobox.de/gpg/0x74DCA8A36C52F833.asc)\]
+Torsten Grote {{<hidingemail
+  email="<gro.tcejorprairb@netsrot>"
+  pgplink="https://grobox.de/gpg/0x74DCA8A36C52F833.asc" >}}
 
-Michael Rogers &lt;<contact@briarproject.org>&gt; \[[PGP
-key](/keys/contact.asc)\]
+Michael Rogers{{<hidingemail
+  email="gro.tcejorprairb@tcatnoc"
+  pgplink="/keys/contact.asc" >}}
 
 Twitter: [@BriarApp](https://twitter.com/BriarApp)
diff --git a/content/page/about.md b/content/page/about.md
index ea883a9..97ae0c4 100644
--- a/content/page/about.md
+++ b/content/page/about.md
@@ -53,5 +53,6 @@ Fund](https://www.opentech.fund/), the [Prototype
 Fund](https://prototypefund.de/), and
 [Internews](https://www.internews.org/).
 
-To contact the team, please email <contact@briarproject.org> \[[PGP
-key](/keys/contact.asc)\].
+To contact the team, please email {{<hidingemail
+  email="gro.tcejorprairb@tcatnoc"
+  pgplink="/keys/contact.asc" >}}.
diff --git a/content/page/download.md b/content/page/download.md
index c29bd6b..9b23254 100644
--- a/content/page/download.md
+++ b/content/page/download.md
@@ -24,7 +24,9 @@ list](https://lists.sourceforge.net/lists/listinfo/briar-announce).
 If you're interested in getting involved or following the progress of
 the project, please [join the development mailing
 list](https://lists.sourceforge.net/lists/listinfo/briar-devel) or email
-<contact@briarproject.org> \[[PGP key](/keys/contact.asc)\].
+{{<hidingemail
+  email="gro.tcejorprairb@tcatnoc"
+  pgplink="/keys/contact.asc" >}}.
 
 All our software is open source - you can [browse the source
 code](https://code.briarproject.org/briar/briar/tree/master) or [build
diff --git a/content/page/get-involved.md b/content/page/get-involved.md
index a459849..7bc987e 100644
--- a/content/page/get-involved.md
+++ b/content/page/get-involved.md
@@ -12,7 +12,9 @@ experienced contributors.
 If you're interested in getting involved or following the progress of
 the project, please [join the development mailing
 list](https://lists.sourceforge.net/lists/listinfo/briar-devel) or email
-<contact@briarproject.org> \[[PGP key](/keys/contact.asc)\]. Translators
+{{<hidingemail
+  email="gro.tcejorprairb@tcatnoc"
+  pgplink="/keys/contact.asc" >}}. Translators
 can volunteer through our [Transifex
 project](https://transifex.com/otf/briar).
 
diff --git a/content/page/hiring.md b/content/page/hiring.md
index bd252c1..e09da74 100644
--- a/content/page/hiring.md
+++ b/content/page/hiring.md
@@ -5,8 +5,9 @@ title: Sorry, We're Not Currently Hiring
 ---
 
 We don't currently have any paid positions available. If you'd like to
-hear about future vacancies, please email <contact@briarproject.org>
-\[[PGP key](/keys/contact.asc)\].
+hear about future vacancies, please email {{<hidingemail
+  email="gro.tcejorprairb@tcatnoc"
+  pgplink="/keys/contact.asc" >}}.
 
 If you're interested in getting involved as a volunteer, please [join
 the development mailing
diff --git a/content/page/privacy.md b/content/page/privacy.md
index 09ac88f..f37cf48 100644
--- a/content/page/privacy.md
+++ b/content/page/privacy.md
@@ -40,4 +40,6 @@ policy](https://slashdotmedia.com/privacy-statement/) applies to the
 mailing lists. The list archives are public.
 
 If you have any questions about our privacy policy, please email
-<contact@briarproject.org> \[[PGP key](/keys/contact.asc)\].
+{{<hidingemail
+  email="gro.tcejorprairb@tcatnoc"
+  pgplink="/keys/contact.asc" >}}.
diff --git a/themes/briar/layouts/shortcodes/hidingemail.html b/themes/briar/layouts/shortcodes/hidingemail.html
new file mode 100644
index 0000000..2d31b5d
--- /dev/null
+++ b/themes/briar/layouts/shortcodes/hidingemail.html
@@ -0,0 +1,2 @@
+{{.Get "name" }} <span class="reverse">{{.Get "email" }}</span>
+[<a href="{{.Get "pgplink" }}">PGP key</a>]<F12>
-- 
GitLab