mirror of
https://github.com/webmin/webmin.git
synced 2026-03-20 08:40:24 +00:00
Fix to consider XML too #1907
This commit is contained in:
@@ -84,17 +84,15 @@ if ($ENV{'PATH_INFO'}) {
|
||||
print "Content-length: $st[7]\n";
|
||||
print "X-Content-Type-Options: nosniff\n";
|
||||
print "Content-type: $type\n\n";
|
||||
if ($type =~ /text\/html/i) {
|
||||
local $/;
|
||||
$buffer = <FILE>;
|
||||
print &filter_javascript($buffer);
|
||||
}
|
||||
else {
|
||||
while(read(FILE, $buffer, &get_buffer_size_binary())) {
|
||||
print $buffer;
|
||||
while(read(FILE, $buffer, &get_buffer_size_binary())) {
|
||||
if ($type =~ /text\/html|xml/i) {
|
||||
print &filter_javascript($buffer);
|
||||
}
|
||||
else {
|
||||
print("$buffer");
|
||||
}
|
||||
close(FILE);
|
||||
}
|
||||
close(FILE);
|
||||
}
|
||||
|
||||
# Switch back to root
|
||||
|
||||
Reference in New Issue
Block a user