Gitweb indentation wrong in Internet Explorer
- From
- Ralf Baechle <ralf@linux-mips.org>
- Date
- Oct 11, 2006, 17:25 UTC
- Message-ID
- <20061011172553.GA1147@linux-mips.org>
I have a report from an MSIE suffering user:
> When I use it (and I believe I've seen this on my laptop as well as my > workstation) all left-hand margin whitespace is collapsed to nothingness. > Once can still parse the code, but it's harder with no indentations.
A screenshot from a Windows laptop to illustrate the problem is at http://www.linux-mips.org/~ralf/gitweb.png. It shows the code was preformatted correctly which seems to be an IE bug but the following patch seems to work around it.
*** gitweb.cgi.dist 2006-10-09 19:02:19.561726255 +0100
--- gitweb.cgi 2006-10-09 19:03:31.744837495 +0100
***************
*** 234,239 ****
--- 234,240 ----
my $str = shift;
$str = decode("utf8", $str, Encode::FB_DEFAULT);
$str = escapeHTML($str);
+ $str =~ s/ / /g;
return $str;
}Thanks,
Ralf