Fixes bug #68964 reported by samv, where pod2html encoded E<0x2070> to
&0x2070 and not ⁰. perlpodspec says E<0x2070> should work, but the
code in Pod::Html accepted only E<x2070>. The new code accepts both, and
processes octal entities correctly as well.
Signed-off-by: Abhijit Menon-Sen <ams@toroid.org>
# E<x> - convert to character
$$rstr =~ s/^([^>]*)>//;
my $escape = $1;
- $escape =~ s/^(\d+|X[\dA-F]+)$/#$1/i;
+ $escape =~ s/^0?x([\dA-F]+)$/#x$1/i
+ or $escape =~ s/^0([0-7]+)$/'#'.oct($1)/ei
+ or $escape =~ s/^(\d+)$/#$1/;
$res = "&$escape;";
} elsif( $func eq 'F' ){
file and something that looks like an E<lt>htmlE<gt> tag.
This is some C<$code($arg1)>.
+Some numeric escapes: E<0120> E<0x65> E<x72> E<108>
+
=cut
<p>Here is some <strong>bold</strong> text, some <em>italic</em> plus <em class="file">/etc/fstab</em>
file and something that looks like an <html> tag.
This is some <code>$code($arg1)</code>.</p>
+<p>Some numeric escapes: P e r l</p>
</body>