gitweb: Harden UTF-8 handling in generated links
commitd49c08256b41e27879454a1f872bcfb80877acad
authorJakub Narębski <jnareb@gmail.com>
Tue, 27 May 2014 14:22:42 +0000 (27 16:22 +0200)
committerJunio C Hamano <gitster@pobox.com>
Tue, 27 May 2014 22:11:49 +0000 (27 15:11 -0700)
tree0b033ddcdd794dc3a8b3d6dbb58e1ce019234a93
parenteea591373e139fc8aab89a78ccb0b1512a2bf0de
gitweb: Harden UTF-8 handling in generated links

esc_html() ensures that its input is properly UTF-8 encoded and marked
as UTF-8 with to_utf8().  Make esc_param() (used for query parameters
in generated URLs), esc_path_info() (for escaping path_info
components) and esc_url() use it too.

This hardens gitweb against errors in UTF-8 handling; because
to_utf8() is idempotent it won't change correct output.

Reported-by: Michael Wagner <accounts@mwagner.org>
Signed-off-by: Jakub Narębski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
gitweb/gitweb.perl