diff --git a/lib/Pod/PseudoPod/DOM/Role/XHTML.pm b/lib/Pod/PseudoPod/DOM/Role/XHTML.pm index 5b8fa90..7aa8e2c 100644 --- a/lib/Pod/PseudoPod/DOM/Role/XHTML.pm +++ b/lib/Pod/PseudoPod/DOM/Role/XHTML.pm @@ -246,8 +246,7 @@ sub encode_index_anchor $text =~ s/^\*//; $text =~ s/[\s"]//g; - $text =~ s//>/g; + $text = encode_entities($text); return $text; } diff --git a/t/html/escapes.t b/t/html/escapes.t index 76b01d4..4693624 100644 --- a/t/html/escapes.t +++ b/t/html/escapes.t @@ -83,6 +83,9 @@ like_string $result, qr//, like_string $result, qr//, '... and should escape <> symbols'; +like_string $result, qr//, + '... in index anchors as well'; + like_string $result, qr/
  • \$BANG BANG\$

    /, 'escapes work inside items first line'; diff --git a/t/test_file.pod b/t/test_file.pod index d1032cc..a01e5e7 100644 --- a/t/test_file.pod +++ b/t/test_file.pod @@ -82,6 +82,7 @@ behavior (C<$some_variable-->) should be fine too. C<'single quotes'> need to be single quotes, not fancy curly apostrophes. X +X Index entries are more fun, as more special characters must be escaped, with a quote sign. E.g. X, X, X and