15 |
$s =~ s/</</g; |
$s =~ s/</</g; |
16 |
$s =~ s/>/>/g; |
$s =~ s/>/>/g; |
17 |
$s =~ s/"/"/g; |
$s =~ s/"/"/g; |
18 |
$s =~ s!([\x00-\x09\x0B-\x1F\x7F-\x80])!sprintf '<var>U+%04X</var>', ord $1!ge; |
$s =~ s{([\x00-\x09\x0B-\x1F\x7F-\xA0\x{FEFF}\x{FFFC}-\x{FFFF}])}{ |
19 |
|
sprintf '<var>U+%04X</var>', ord $1; |
20 |
|
}ge; |
21 |
return $s; |
return $s; |
22 |
} # htescape |
} # htescape |
23 |
|
|
30 |
exit; |
exit; |
31 |
} |
} |
32 |
|
|
33 |
|
binmode STDOUT, ':utf8'; |
34 |
|
|
35 |
require Message::DOM::DOMImplementation; |
require Message::DOM::DOMImplementation; |
36 |
my $dom = Message::DOM::DOMImplementation->new; |
my $dom = Message::DOM::DOMImplementation->new; |
37 |
|
|