mirror of
https://github.com/isc-projects/bind9.git
synced 2026-06-10 18:40:00 -04:00
handle <!ENTITY within <!DOCTYPE
(cherry picked from commit 3db767c98f)
This commit is contained in:
parent
22ebfe3741
commit
f014ce8ea4
1 changed files with 19 additions and 0 deletions
|
|
@ -317,6 +317,25 @@ foreach $file (keys %file_types) {
|
|||
while (/^<!DOCTYPE/ || /^<!ENTITY/ || /^<\?xml-stylesheet/ || /^<\?xml /) {
|
||||
# print "SGML: $_";
|
||||
$before_copyright = "$before_copyright$_";
|
||||
if (/\]>$/ ) {
|
||||
$_ = <SOURCE>;
|
||||
close(SOURCE) if (eof(SOURCE));
|
||||
next;
|
||||
}
|
||||
if (/^<!DOCTYPE/) {
|
||||
while (!eof(SOURCE)) {
|
||||
$_ = <SOURCE>;
|
||||
next if (eof(SOURCE));
|
||||
$before_copyright =
|
||||
"$before_copyright$_";
|
||||
if (/]>$/) {
|
||||
$_ = <SOURCE>;
|
||||
last;
|
||||
}
|
||||
}
|
||||
close(SOURCE) if (eof(SOURCE));
|
||||
next;
|
||||
}
|
||||
if (/>$/ ) {
|
||||
$_ = <SOURCE>;
|
||||
close(SOURCE) if (eof(SOURCE));
|
||||
|
|
|
|||
Loading…
Reference in a new issue