]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
handle <!ENTITY within <!DOCTYPE
authorMark Andrews <marka@isc.org>
Tue, 6 Oct 2015 07:19:24 +0000 (18:19 +1100)
committerMark Andrews <marka@isc.org>
Tue, 6 Oct 2015 07:19:24 +0000 (18:19 +1100)
util/update_copyrights

index aa7d676376dc58dc73fdc20c462183af7f04cde1..89300539d4af82ee5766305197a256f569ee448c 100644 (file)
@@ -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));