From: Florian Ragwitz Date: Sat, 7 May 2011 21:13:24 +0000 (+0200) Subject: Only unescape meta characters X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=225fbc71da17ace6e5643141f1aea6b7d253819f;p=catagits%2FHTML-Zoom.git Only unescape meta characters --- diff --git a/lib/HTML/Zoom/SelectorParser.pm b/lib/HTML/Zoom/SelectorParser.pm index f23f4b8..e2215f9 100644 --- a/lib/HTML/Zoom/SelectorParser.pm +++ b/lib/HTML/Zoom/SelectorParser.pm @@ -194,7 +194,7 @@ sub parse_selector { sub _unescape { my ($self, $escaped) = @_; - (my $unescaped = $escaped) =~ s/\\(.)/$1/g; + (my $unescaped = $escaped) =~ s/\\([\Q$sel_meta_char\E])/$1/g; return $unescaped; }