# HG changeset patch # User Matti Hamalainen # Date 1478261372 -7200 # Node ID cc4b935b948292d0883e9ea8787f9520f716c562 # Parent 6bfd2865941a642712c2b007c93acc06da1245ce Fix entity handling. diff -r 6bfd2865941a -r cc4b935b9482 docs/tfdoc.pl --- a/docs/tfdoc.pl Fri Nov 04 14:06:40 2016 +0200 +++ b/docs/tfdoc.pl Fri Nov 04 14:09:32 2016 +0200 @@ -7,28 +7,20 @@ use strict; use warnings; -my %entities = ( - "<" => "lt", - ">" => "gt", - "&" => "amp", -); - ## Convert special characters to HTML/XML entities sub xmlentities($) { my $value = $_[0]; - $value =~ s/$_/\&$entities{$_}\;/g foreach (keys %entities); + $value =~ s/&/&/g; + $value =~ s//>/g; return $value; } -my %xentities = ( - "&" => "&", -); - sub xmlentities2($) { my $value = $_[0]; - $value =~ s/$_/$xentities{$_}/g foreach (keys %xentities); + $value =~ s/&/&/g; my $str = ""; my $state = 0;