summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2012-01-10 15:43:55 +0100
committerNicholas Clark <nick@ccl4.org>2012-01-17 11:16:35 +0100
commit632c5d30411034128e91ad264a6401fe25d27710 (patch)
tree8a657834983dbd508e52a6ba5064e1d60509a4a9 /ext
parent6c6fc3be9a6e74e4af716aada7ae4cbd4feb8338 (diff)
downloadperl-632c5d30411034128e91ad264a6401fe25d27710.tar.gz
Make Pod::Html more robust against malformed L<> contents.
Pod::Html attempts to search for the contents to see if they are a suffix of any entry in an existing list, using a regular expression. Previously the contents were interpolated directly into a regex, which meant that if they happened to be syntactically invalid regular expression syntax, Pod::Html aborted with a runtime error.
Diffstat (limited to 'ext')
-rw-r--r--ext/Pod-Html/lib/Pod/Html.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/Pod-Html/lib/Pod/Html.pm b/ext/Pod-Html/lib/Pod/Html.pm
index 5ae242b96f..444174274a 100644
--- a/ext/Pod-Html/lib/Pod/Html.pm
+++ b/ext/Pod-Html/lib/Pod/Html.pm
@@ -3,7 +3,7 @@ use strict;
require Exporter;
use vars qw($VERSION @ISA @EXPORT @EXPORT_OK);
-$VERSION = 1.12;
+$VERSION = 1.13;
@ISA = qw(Exporter);
@EXPORT = qw(pod2html htmlify);
@EXPORT_OK = qw(anchorify);
@@ -571,7 +571,7 @@ sub resolve_pod_page_link {
# as a substitute (e.g., $Podpath/Pod/Simple/XHTML)
my @matches;
foreach my $modname (keys %{$self->pages}) {
- push @matches, $modname if $modname =~ /::$to\z/;
+ push @matches, $modname if $modname =~ /::\Q$to\E\z/;
}
if ($#matches == -1) {