Code

only froward pub and not everything ...
[rrdtool-all.git] / website / bin / htmlfix.sh
index 7bb2a6c9a4b7ab3e6c7daf8aa8843654aaa599eb..9437245e35979e2a0da13e0b9de0b9a6e267c59c 100755 (executable)
@@ -1,8 +1,10 @@
 #! /bin/sh
 case $1 in
 *.html)
-   perl -i -0777 -p -e 's/^\s*//' $1
    tidy -latin1 -wrap 0 -q -asxhtml $1  >$1.fixed  2>$1.report
+   perl -i -0777 -p -e 's/^\s*//;s{="mailto:(oetiker|tobi|tobias)@(oetiker.ch|ee.ethz.ch)"}{="http://tobi.oetiker.ch/"}g;s{="mailto:(\S*?)\@(\S*?)"}{="mailto:$1@..delete..this..$2"}g' $1.fixed
+   # yes, beleive it or not IE chockes on propper xhtml pages ... sigh
+   perl -i -0777 -p -e 's/^\s*<\?xml.+?\?>\s*//;'  $1.fixed
    if [ $? != 0 ]; then
         echo Parsing: $1
         egrep -v "^(HTML Tidy|$1:|To learn|Please send|HTML and CSS|Lobby your)" $1.report