gitweb: Introduce esc_attr to escape attributes of HTML elements
It is needed only to escape attributes of handcrafted HTML elements, and not those generated using CGI.pm subroutines / methods for HTML generation.
While at it, add esc_url and esc_html where needed, and prefer to use CGI.pm HTML generating methods than handcrafted HTML code. Most of those are probably unnecessary (could be exploited only by person with write access to gitweb config, or at least access to the repository).
This fixes CVE-2010-3906
Reported-by: Emanuele Gentili <firstname.lastname@example.org> Helped-by: John 'Warthog9' Hawley <email@example.com> Helped-by: Jonathan Nieder <firstname.lastname@example.org> Signed-off-by: Jakub Narebski <email@example.com> Signed-off-by: Junio C Hamano <firstname.lastname@example.org>