]> Lady’s Gitweb - Gitweb/blobdiff - gitweb.perl
gitweb: pass string after encoding in utf-8 to syntax highlighter
[Gitweb] / gitweb.perl
index 349c969376cc92d92f0a57edda32e7357a25c51ee5868c03fb3fec12af90bfe2..915f364fa6a453a95b468e4c72b05bc7d108fb291cff3f6bd0954d221d5b3084 100755 (executable)
@@ -6485,7 +6485,7 @@ sub git_blob {
                        $nr++;
                        $line = untabify($line);
                        printf qq!<div class="pre"><a id="l%i" href="%s#l%i" class="linenr">%4i</a> %s</div>\n!,
-                              $nr, href(-replay => 1), $nr, $nr, $syntax ? $line : esc_html($line, -nbsp=>1);
+                              $nr, esc_attr(href(-replay => 1)), $nr, $nr, $syntax ? to_utf8($line) : esc_html($line, -nbsp=>1);
                }
        }
        close $fd
This page took 0.038502 seconds and 4 git commands to generate.