25 lines
603 B
Diff
25 lines
603 B
Diff
--- foomatic-db-engine-3.0.2/lib/Foomatic/PPD.pm.bad-utf8 2002-10-11 02:16:34.000000000 +0100
|
|
+++ foomatic-db-engine-3.0.2/lib/Foomatic/PPD.pm 2004-11-23 19:32:26.000000000 +0000
|
|
@@ -300,11 +300,17 @@
|
|
sub xml_esc {
|
|
my ($in) = (@_);
|
|
|
|
- $in =~ s!&!&!g;
|
|
- $in =~ s!<!<!g;
|
|
- $in =~ s!>!>!g;
|
|
+ @chars = split(//,$in);
|
|
+ $ascii = "";
|
|
+ foreach (@chars) {
|
|
+ if (ord ($_) > 127) { $_="?"; }
|
|
+ $ascii .= $_;
|
|
+ }
|
|
+ $ascii =~ s!&!&!g;
|
|
+ $ascii =~ s!<!<!g;
|
|
+ $ascii =~ s!>!>!g;
|
|
|
|
- return $in;
|
|
+ return $ascii;
|
|
}
|
|
|
|
sub pdq_filter {
|