Re: [PATCH 2/n] gitweb: Use '&iquot;' instead of '?' in esc_path

From: Junio C Hamano <junkio@cox.net>
Date: 2006-11-04 08:44:29
Jakub Narebski <jnareb@gmail.com> writes:

> # quote unsafe characters and escape filename to HTML
> sub esc_path {
> 	my $str = shift;
> 	$str = esc_html($str);
> 	$str =~ s!([[:cntrl:]])!sprintf('<span class="cntrl">&#%04d;</span>', 9216+ord($1))!eg;
> 	return $str;
> }
>
> with perhaps the following CSS
>
> span.cntrl {
> 	border: dashed #aaaaaa;
> 	border-width: 1px;
> 	padding: 0px 2px 0px 2px;
> 	margin:  0px 2px 0px 2px;
> }
>
> What do you think of it?

Probably "# quote unsafe characters" is not what it does yet (it
just quotes controls currently and nothing else), but we have to
start somewhere and I think this is a good start.


-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Received on Sat Nov 04 08:44:44 2006

This archive was generated by hypermail 2.1.8 : 2006-11-04 08:45:44 EST