*** lib/TWiki.pm Tue Dec 4 07:59:42 2001 --- lib.patched/TWiki.pm Wed Aug 14 10:32:47 2002 *************** *** 138,143 **** --- 138,166 ---- $formatVersion = "1.0"; + # Some constant stuff for charcter translations + my $trans_characters='([äöüÄÖÜß§])'; + my %trans_to_7bit=( + 'ä' => 'ae', + 'ö' => 'oe', + 'ü' => 'ue', + 'Ä' => 'Ae', + 'Ö' => 'Oe', + 'Ü' => 'Ue', + 'ß' => 'ss', + '§' => 'Par' + ); + my %trans_to_html=( + 'ä' => 'ä', + 'ö' => 'ö', + 'ü' => 'ü', + 'Ä' => 'Ä', + 'Ö' => 'Ö', + 'Ü' => 'Ü', + 'ß' => 'ß', + '§' => '§' + ); + # ========================= sub initialize *************** *** 1739,1744 **** --- 1762,1770 ---- # $thePreamble is heading space # $doLink is boolean, false suppress link for non-existing pages + # Transscript Umlaute etc + $theTopic =~ s/$trans_characters/$trans_to_7bit{$1}/g; + $theLinkText =~ s/$trans_characters/$trans_to_html{$1}/g; # kill spaces and Wikify page name (ManpreetSingh - 15 Sep 2000) $theTopic =~ s/^\s*//; $theTopic =~ s/\s*$//; *************** *** 2059,2064 **** --- 2085,2092 ---- # Wiki Plugin Hook &TWiki::Plugins::endRenderingHandler( $result ); + # eleminate bad characters finally + $result =~ s/$trans_characters/$trans_to_html{$1}/g; $result =~ s|\n?\n$||os; # clean up clutch return "$head$result"; }