Commit 0ba70ca5 authored by Laurent Heirendt's avatar Laurent Heirendt
Browse files

Merge branch 'add-email-obfuscator' into 'develop'

Add email obfuscation

See merge request !125
parents aaab4765 5ce8df23
Pipeline #24290 passed with stages
in 2 minutes and 4 seconds
......@@ -27,6 +27,9 @@ group :jekyll_plugins do
gem "jekyll-feed",
"~> 0.6"
gem 'jekyll-email-protect',
"~> 1.1"
gem 'jekyll-theme-lcsb-frozen-components',
'~> 0.0.2',
:git => "",
Jekyll::Hooks.register([:pages, :posts, :documents], :pre_render) do |post|
# This will run every time the website is built
# Include a plugin (needs to be in gemfile)
include Jekyll::EmailProtect::EmailProtectionFilter
# Using a simpler version of email regexp
email_regexp = /mailto\:(?:[\'\"]*)(?:[\w+\-]\.?)+@[a-z\d\-]+(?:\.[a-z]+)*\.[a-z]+(?:[\'\"]*)/i
# Take post's content, and transform every occurence of the following regexp (an email)
post.content = post.content.gsub(email_regexp) {
# For every occurence, apply protection function:
|param| "mailto:" + Jekyll::EmailProtect::EmailProtectionFilter::encode_email(param[7..-1].delete("'").delete('"'))
......@@ -7,7 +7,4 @@ order: 3
If you need help, please create a request for support by creating a ticket on [ServiceNow]( using the catalog item _LCSB/BioCore: Application Services_.
If you don't have access to service now, please contact us using <span id="obf"><noscript><span style="unicode-bidi:bidi-override;direction:rtl;">ul.inu@snimdasys-bscl</span></noscript></span>.
<script>document.getElementById("obf").innerHTML="<n uers=\"znvygb:ypfo-flfnqzvaf@hav.yh?fhowrpg=[ynoPneqf] Freivpr erdhrfg\" gnetrg=\"_oynax\">guvf rznvy</n>".replace(/[a-zA-Z]/g,function(c){return String.fromCharCode((c<="Z"?90:122)>=(c=c.charCodeAt(0)+13)?c:c-26);});document.body.appendChild(eo);</script>
\ No newline at end of file
If you don’t have access to service now, please contact us using [this email]([How-to cards]%20Service%20request).
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment