diff options
-rw-r--r-- | Makefile | 6 | ||||
-rw-r--r-- | chapter01/changelog.xml | 7 | ||||
-rw-r--r-- | general.ent | 4 | ||||
-rw-r--r-- | obfuscate.sh | 35 |
4 files changed, 48 insertions, 4 deletions
@@ -25,6 +25,10 @@ lfs: *.html for filename in `find $(BASEDIR) -name "*.html"`; do \ + sh obfuscate.sh $$filename; \ + done; + + for filename in `find $(BASEDIR) -name "*.html"`; do \ tidy -config tidy.conf $$filename; \ true; \ done; @@ -56,6 +60,8 @@ nochunks: --output $(BASEDIR)/$(NOCHUNKS_OUTPUT) \ stylesheets/lfs-nochunks.xsl index.xml + sh obfuscate.sh $(BASEDIR)/$(NOCHUNKS_OUTPUT) + tidy -config tidy.conf $(BASEDIR)/$(NOCHUNKS_OUTPUT) || true sed -i -e "s@text/html@application/xhtml+xml@g" \ diff --git a/chapter01/changelog.xml b/chapter01/changelog.xml index 9650993bc..9f5e27d32 100644 --- a/chapter01/changelog.xml +++ b/chapter01/changelog.xml @@ -94,7 +94,7 @@ First a summary, then a detailed log.</para> <listitem><para>&perl-libc-patch;</para></listitem> </itemizedlist> </listitem> - + <listitem><para>Removed:</para> <itemizedlist> <listitem><para>gcc-3.4.3-linkonce-1.patch</para></listitem> @@ -107,6 +107,9 @@ First a summary, then a detailed log.</para> </itemizedlist> </listitem> +<listitem><para>July 22th, 2005 [manuel]: Added obfuscate.sh and modified the +Makefile to obfuscate e-mail addresses in XHTML output.</para></listitem> + <listitem><para>July 19th, 2005 [matt]: Removed flex++ from the list of installed files, as it is no longer present (Randy McMurchy)</para></listitem> <listitem><para>July 15th, 2005 [matt]: Updated to Linux-2.6.12.3.</para></listitem> @@ -601,7 +604,7 @@ should fix the TLS strip issue that's been seen, at least on X86</para></listite <listitem><para>December 22, 2004 [manuel]: Readded to chapter09/reboot.xml a para lost from version 5.1.</para></listitem> -<listitem><para>December 20, 2004 [manuel]: Made grub's configuration location +<listitem><para>December 20, 2004 [manuel]: Made grub's configuration location FHS compliant.</para></listitem> <listitem><para>December 19, 2004 [manuel]: Added the irc.lfs-matrix.de IRC server.</para></listitem> diff --git a/general.ent b/general.ent index 4a9e8722f..56f83ecd0 100644 --- a/general.ent +++ b/general.ent @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="ISO-8859-1"?> -<!ENTITY version "SVN-20050721"> -<!ENTITY releasedate "July 21, 2005"> +<!ENTITY version "SVN-20050722"> +<!ENTITY releasedate "July 22, 2005"> <!ENTITY milestone "6.2"> <!ENTITY generic-version "development"> <!-- Use "development", "testing", or "x.y[-pre{x}]" --> diff --git a/obfuscate.sh b/obfuscate.sh new file mode 100644 index 000000000..0e9f8f8fe --- /dev/null +++ b/obfuscate.sh @@ -0,0 +1,35 @@ +#!/bin/bash + +# obfuscate.sh +# obfuscate email addresses in XML/HTML +# Script written (and slight perl modification) by Archaic <archaic AT linuxfromscratch D0T org> +# Original Perl expression by Anderson Lizardo <lizardo AT linuxfromscratch D0T org> +# Released under the GNU General Public License +# +# This script currently only seeks out mailto: addresses. If those same +# addresses also appear in plaintext, we need to obfuscate those as well. +# +# This script was made for a very specific purpose so I was a bit lazy in +# writing the regex's. +# +# Please send comments, enhancements, etc. to the above address + +#set -e # Bail on all errors + +# First, ensure that we are given a file to process +# if [ $# -lt 1 ]; then +# echo -e "\nYou must provide an input file." +# exit 1 +# fi + +# Nothing like a backup plan! +#cp "$1" "$1".bak + +for i in `grep -o '"mailto:.*@.*"' "$1" |sed -e 's|^"mailto:||' -e 's|"$||'`; do + link=`echo $i | perl -pe 's/[^\n]/"\\\&#".ord($&)."\;"/ge'` + plaintext=`echo $i | sed -e 's|@| AT |' -e 's|\.| D0T |g'` + sed -i "s|mailto:$i|mailto:$link|" "$1" + sed -i "s|$i|$plaintext|" "$1" +done + +#exit 0 |