gitweb: escape html in rss title
[gitweb.git] / git-send-email.perl
index b1fb7e615f309da5771927a8e9ab4e61ad8f5f59..aea66a0d47a9ad64fe805351c631fe5fddbf6182 100755 (executable)
@@ -874,11 +874,13 @@ sub make_message_id {
 sub unquote_rfc2047 {
        local ($_) = @_;
        my $encoding;
-       if (s/=\?([^?]+)\?q\?(.*)\?=/$2/g) {
+       s{=\?([^?]+)\?q\?(.*?)\?=}{
                $encoding = $1;
-               s/_/ /g;
-               s/=([0-9A-F]{2})/chr(hex($1))/eg;
-       }
+               my $e = $2;
+               $e =~ s/_/ /g;
+               $e =~ s/=([0-9A-F]{2})/chr(hex($1))/eg;
+               $e;
+       }eg;
        return wantarray ? ($_, $encoding) : $_;
 }