From 1f6b6543597993440d62a22d2aa0b03cae23c9f6 Mon Sep 17 00:00:00 2001 From: Michael Smith Date: Sun, 30 Oct 2005 15:39:45 +0000 Subject: [PATCH] Just replace ampersands instead of doing other nonsense. --- contrib/tools/cloak/cloak | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/contrib/tools/cloak/cloak b/contrib/tools/cloak/cloak index 803beb4ec..c03d050fc 100755 --- a/contrib/tools/cloak/cloak +++ b/contrib/tools/cloak/cloak @@ -39,7 +39,7 @@ if ($lines =~ m/$comment/ || $0 =~ m/uncloak/) { # PI syntax in that SGML PIs don't have the closing question mark $lines =~ s/<\?$comment [\?]+>//; # remove comment added by cloak - $lines =~ s/<\?ENT_ (.*?)_ENT[\?]+>/$1/g; # uncloak all cloaked entities + $lines =~ s/##AMP_ENT##/\&/g; # uncloak all cloaked entities if ($lines =~ /<\?DOCTYPE(.*)_END_SUBSET[\?]+>/s) { $doctype = $1; $doctype =~ s/xxLESS_THANxx/\n"; # cloak all entities - $lines =~ s/(\w*&[^;]+;\w*)|(&[^;]+;)//g; + $lines =~ s/&/##AMP_ENT##/g; # uncloak entities in subset - while ($lines =~ /((.*?'\s*>)/s) { - $lines =~ s/((.*?'\s*>)/$1$2$3/s + while ($lines =~ /()/s) { + $lines =~ s/()/$1\&$2/s } - while ($lines =~ /((.*?'\s*>)/s) { - $lines =~ s/((.*?"\s*>)/$1$2$3/s + while ($lines =~ /()/s) { + $lines =~ s/()/$1\&$2/s } # test to see if there is an internal subset or not, then # cloak DOCTYPE declaration and internal subset (if there is one) -- 2.40.0