pub / stagit-scripts

Building src.jayvii.de with stagit
git clone https://src.jayvii.de/pub/stagit-scripts.git
Home | Log | Files | Exports | Refs | README | RSS

commit 12471812005aeba9fb47c1e23946568cea971731
parent b75de5b3f68fc45b33eeafd621375f3a51d3a1b3
Author: JayVii <jayvii[AT]posteo[DOT]de>
Date:   Sat, 27 Apr 2024 14:37:01 +0200

Protect Mail-Adresses against basic scraping

Diffstat:
Mbin/git_update_repo_html.sh | 7+++++++
1 file changed, 7 insertions(+), 0 deletions(-)

diff --git a/bin/git_update_repo_html.sh b/bin/git_update_repo_html.sh @@ -17,6 +17,13 @@ else ln -sf "${1}/${2}/${3}/files/README*.html" "${1}/${2}/${3}/index.html" fi +# Protect Mail-Adresses in HTML +MAILEXP='s/([a-zA-Z0-9\.]+)\@([a-zA-Z0-9\-]+)\.([a-z]+)/\1\[AT\]\2\[DOT\]\3/g' +find "${1}/${2}/${3}/" \ + -type f \ # only files, not directories + -exec grep -Iq . {} \; \ # ignore binary files + -exec sed -E -e ${MAILEXP} -i {} \; # apply REGEX + # link assets ln -sf "${1}/assets/style.css" "${1}/${2}/${3}/style.css" ln -sf "${1}/assets/favicon.png" "${1}/${2}/${3}/favicon.png"