summaryrefslogtreecommitdiff
path: root/lib/Pod
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Pod')
-rw-r--r--lib/Pod/Html.pm4
-rw-r--r--lib/Pod/t/htmlescp.pod2
-rw-r--r--lib/Pod/t/htmlescp.t1
3 files changed, 6 insertions, 1 deletions
diff --git a/lib/Pod/Html.pm b/lib/Pod/Html.pm
index 99f95a9210..6174dd7457 100644
--- a/lib/Pod/Html.pm
+++ b/lib/Pod/Html.pm
@@ -1575,7 +1575,9 @@ sub process_text1($$;$$){
# 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' ){
diff --git a/lib/Pod/t/htmlescp.pod b/lib/Pod/t/htmlescp.pod
index dc53ca75a0..c901314c76 100644
--- a/lib/Pod/t/htmlescp.pod
+++ b/lib/Pod/t/htmlescp.pod
@@ -11,4 +11,6 @@ Here is some B<bold> text, some I<italic> plus F</etc/fstab>
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
diff --git a/lib/Pod/t/htmlescp.t b/lib/Pod/t/htmlescp.t
index 16503c4d95..95942cdf9e 100644
--- a/lib/Pod/t/htmlescp.t
+++ b/lib/Pod/t/htmlescp.t
@@ -52,6 +52,7 @@ instead of escaping them as &lt; and &gt;.</p>
<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 &lt;html&gt; tag.
This is some <code>$code($arg1)</code>.</p>
+<p>Some numeric escapes: &#80; &#x65; &#x72; &#108;</p>
</body>