* Gitweb indentation wrong in Internet Explorer
@ 2006-10-11 17:25 Ralf Baechle
2006-10-11 17:47 ` Jakub Narebski
2006-10-11 18:13 ` Gitweb indentation wrong in Internet Explorer Luben Tuikov
0 siblings, 2 replies; 16+ messages in thread
From: Ralf Baechle @ 2006-10-11 17:25 UTC (permalink / raw)
To: git
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
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: Gitweb indentation wrong in Internet Explorer
2006-10-11 17:25 Gitweb indentation wrong in Internet Explorer Ralf Baechle
@ 2006-10-11 17:47 ` Jakub Narebski
2006-10-11 18:15 ` Ralf Baechle
2006-10-11 20:53 ` Pazu
2006-10-11 18:13 ` Gitweb indentation wrong in Internet Explorer Luben Tuikov
1 sibling, 2 replies; 16+ messages in thread
From: Jakub Narebski @ 2006-10-11 17:47 UTC (permalink / raw)
To: git
Ralf Baechle wrote:
> 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.
Which version of gitweb? We have removed s/ / /g; in esc_html
subroutine in favor of using "white-space: pre;" in CSS some time ago,
and we have added escaping FORM FEED and ESCAPE characters.
Could you send git patches, by the way? Or at least '-p' diffs?
--
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: Gitweb indentation wrong in Internet Explorer
2006-10-11 17:47 ` Jakub Narebski
@ 2006-10-11 18:15 ` Ralf Baechle
2006-10-11 20:53 ` Pazu
1 sibling, 0 replies; 16+ messages in thread
From: Ralf Baechle @ 2006-10-11 18:15 UTC (permalink / raw)
To: Jakub Narebski; +Cc: git
On Wed, Oct 11, 2006 at 07:47:24PM +0200, Jakub Narebski wrote:
> >> 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.
>
> Which version of gitweb? We have removed s/ / /g; in esc_html
> subroutine in favor of using "white-space: pre;" in CSS some time ago,
> and we have added escaping FORM FEED and ESCAPE characters.
Anything since since at least June 19 seems affected, including yesterday's
version.
> Could you send git patches, by the way? Or at least '-p' diffs?
Nope. I'm just forwarding this.
Ralf
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: Gitweb indentation wrong in Internet Explorer
2006-10-11 17:47 ` Jakub Narebski
2006-10-11 18:15 ` Ralf Baechle
@ 2006-10-11 20:53 ` Pazu
2006-10-11 21:13 ` [PATCH] Removes the <?xml?> declaration from gitweb.pl Pazu
1 sibling, 1 reply; 16+ messages in thread
From: Pazu @ 2006-10-11 20:53 UTC (permalink / raw)
To: git
Jakub Narebski wrote:
> Which version of gitweb? We have removed s/ / /g; in esc_html
> subroutine in favor of using "white-space: pre;" in CSS some time ago,
> and we have added escaping FORM FEED and ESCAPE characters.
The problem here is that "white-space: pre" is only supported by IE6 in
standards compliance mode[1], but the DTD declaration for this page:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
surprisingly triggers IE6 quirks mode[2]. A quick fix to this problem
would be changing the doctype declaration to use XHTML 1.0 Transitional
instead of Strict, as that would trigger IE6 standards-compliance mode.
[1]
http://msdn.microsoft.com/workshop/author/dhtml/reference/properties/whitespace.asp
[2] http://hsivonen.iki.fi/doctype/
-- Marcus
^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH] Removes the <?xml?> declaration from gitweb.pl
2006-10-11 20:53 ` Pazu
@ 2006-10-11 21:13 ` Pazu
2006-10-11 21:27 ` Jakub Narebski
0 siblings, 1 reply; 16+ messages in thread
From: Pazu @ 2006-10-11 21:13 UTC (permalink / raw)
To: git
The XML declaration forces IE6 into quirks mode, breaking our
nice standards compliant stylesheet.
Signed-off-by: Marcus Brito <pazu@pazu.com.br>
---
gitweb/gitweb.perl | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 0ec1eef..ecb3b66 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -1357,7 +1357,6 @@ sub git_header_html {
print $cgi->header(-type=>$content_type, -charset => 'utf-8',
-status=> $status, -expires => $expires);
print <<EOF;
-<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" lang="en-US">
<!-- git web interface version $version, (C) 2005-2006, Kay Sievers
<kay.sievers\@vrfy.org>, Christian Gierke -->
--
1.4.2.3
^ permalink raw reply related [flat|nested] 16+ messages in thread
* Re: [PATCH] Removes the <?xml?> declaration from gitweb.pl
2006-10-11 21:13 ` [PATCH] Removes the <?xml?> declaration from gitweb.pl Pazu
@ 2006-10-11 21:27 ` Jakub Narebski
2006-10-12 0:26 ` Pazu
` (2 more replies)
0 siblings, 3 replies; 16+ messages in thread
From: Jakub Narebski @ 2006-10-11 21:27 UTC (permalink / raw)
To: git
Pazu wrote:
> The XML declaration forces IE6 into quirks mode, breaking our
> nice standards compliant stylesheet.
But isn't it _required_ by XML/XHTML?
--
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH] Removes the <?xml?> declaration from gitweb.pl
2006-10-11 21:27 ` Jakub Narebski
@ 2006-10-12 0:26 ` Pazu
2006-10-12 1:08 ` Pazu
2006-10-12 5:45 ` Robin Rosenberg
2 siblings, 0 replies; 16+ messages in thread
From: Pazu @ 2006-10-12 0:26 UTC (permalink / raw)
To: git
Jakub Narebski wrote:
>> The XML declaration forces IE6 into quirks mode, breaking our
>> nice standards compliant stylesheet.
>
> But isn't it _required_ by XML/XHTML?
As far as I know, it isn't. But even if the specs required it, none of
the popular browsers do, and since we're talking about a web page
intended for presentation (as opposed to automated data processing),
that's what matters.
-- Marcus
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH] Removes the <?xml?> declaration from gitweb.pl
2006-10-11 21:27 ` Jakub Narebski
2006-10-12 0:26 ` Pazu
@ 2006-10-12 1:08 ` Pazu
2006-10-12 5:45 ` Robin Rosenberg
2 siblings, 0 replies; 16+ messages in thread
From: Pazu @ 2006-10-12 1:08 UTC (permalink / raw)
To: git
Jakub Narebski wrote:
> But isn't it _required_ by XML/XHTML?
According to the XML 1.0 specification, section 2.8:
[Definition: XML documents should begin with a XML declaration which
specifies the version of XML being used]
I believe that the use of 'should' instead of 'must' here makes it
highly recommended, but not strictly required. Anyway, the comments in
my previous message (the 'browser support is what really matters' part)
remain valid.
-- Marcus
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH] Removes the <?xml?> declaration from gitweb.pl
2006-10-11 21:27 ` Jakub Narebski
2006-10-12 0:26 ` Pazu
2006-10-12 1:08 ` Pazu
@ 2006-10-12 5:45 ` Robin Rosenberg
2006-10-12 21:21 ` Jakub Narebski
2 siblings, 1 reply; 16+ messages in thread
From: Robin Rosenberg @ 2006-10-12 5:45 UTC (permalink / raw)
To: Jakub Narebski; +Cc: git
onsdag 11 oktober 2006 23:27 skrev Jakub Narebski:
> Pazu wrote:
> > The XML declaration forces IE6 into quirks mode, breaking our
> > nice standards compliant stylesheet.
>
> But isn't it _required_ by XML/XHTML?
For pure XML document it is required, but not for XHTML, unless the encoding
is something other than UTF-8 or (shudder) UTF-16. W3C recommends it though.
-- robin
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH] Removes the <?xml?> declaration from gitweb.pl
2006-10-12 5:45 ` Robin Rosenberg
@ 2006-10-12 21:21 ` Jakub Narebski
2006-10-13 13:01 ` Pazu
2006-10-13 14:05 ` Robin Rosenberg
0 siblings, 2 replies; 16+ messages in thread
From: Jakub Narebski @ 2006-10-12 21:21 UTC (permalink / raw)
To: Robin Rosenberg; +Cc: git
Robin Rosenberg wrote:
> onsdag 11 oktober 2006 23:27 skrev Jakub Narebski:
> > Pazu wrote:
> > > The XML declaration forces IE6 into quirks mode, breaking our
> > > nice standards compliant stylesheet.
> >
> > But isn't it _required_ by XML/XHTML?
>
> For pure XML document it is required, but not for XHTML, unless the encoding
> is something other than UTF-8 or (shudder) UTF-16. W3C recommends it though.
So what should be our decision? Honor IE quirks ;-) and either remove
XML declaration, or use Transitional DTD? Add back SPC to conversion
in esc_html? Ignore broken browsers?
--
Jakub Narebski
Poland
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH] Removes the <?xml?> declaration from gitweb.pl
2006-10-12 21:21 ` Jakub Narebski
@ 2006-10-13 13:01 ` Pazu
2006-10-13 13:07 ` Jakub Narebski
2006-10-13 14:05 ` Robin Rosenberg
1 sibling, 1 reply; 16+ messages in thread
From: Pazu @ 2006-10-13 13:01 UTC (permalink / raw)
To: git
Jakub Narebski wrote:
> So what should be our decision? Honor IE quirks ;-) and either remove
> XML declaration, or use Transitional DTD? Add back SPC to conversion
> in esc_html? Ignore broken browsers?
My bad here. In my first email I said that using the Transitional DTD
would fix the problem, but I was wrong. It doesn't matter the DTD you
use, if you add a <?xml?> declaration, IE will get it wrong and activate
quirks mode.
-- Marcus
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH] Removes the <?xml?> declaration from gitweb.pl
2006-10-13 13:01 ` Pazu
@ 2006-10-13 13:07 ` Jakub Narebski
2006-10-13 14:09 ` Pazu
0 siblings, 1 reply; 16+ messages in thread
From: Jakub Narebski @ 2006-10-13 13:07 UTC (permalink / raw)
To: git
Pazu wrote:
> Jakub Narebski wrote:
>
>> So what should be our decision? Honor IE quirks ;-) and either remove
>> XML declaration, or use Transitional DTD? Add back SPC to conversion
>> in esc_html? Ignore broken browsers?
>
> My bad here. In my first email I said that using the Transitional DTD
> would fix the problem, but I was wrong. It doesn't matter the DTD you
> use, if you add a <?xml?> declaration, IE will get it wrong and activate
> quirks mode.
Well, there is yet another solution. Do browser detection, and do not output
<?xml ... ?> declaration for IE. Perhaps that would be best solution.
--
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH] Removes the <?xml?> declaration from gitweb.pl
2006-10-12 21:21 ` Jakub Narebski
2006-10-13 13:01 ` Pazu
@ 2006-10-13 14:05 ` Robin Rosenberg
2006-10-13 15:09 ` Jakub Narebski
1 sibling, 1 reply; 16+ messages in thread
From: Robin Rosenberg @ 2006-10-13 14:05 UTC (permalink / raw)
To: Jakub Narebski; +Cc: git
torsdag 12 oktober 2006 23:21 skrev Jakub Narebski:
> Robin Rosenberg wrote:
> > onsdag 11 oktober 2006 23:27 skrev Jakub Narebski:
> > > Pazu wrote:
> > > > The XML declaration forces IE6 into quirks mode, breaking our
> > > > nice standards compliant stylesheet.
> > >
> > > But isn't it _required_ by XML/XHTML?
> >
> > For pure XML document it is required, but not for XHTML, unless the
> > encoding is something other than UTF-8 or (shudder) UTF-16. W3C
> > recommends it though.
>
> So what should be our decision? Honor IE quirks ;-) and either remove
> XML declaration, or use Transitional DTD? Add back SPC to conversion
> in esc_html? Ignore broken browsers?
It isn't required by the standard. Why not just drop it?
-- robin
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH] Removes the <?xml?> declaration from gitweb.pl
2006-10-13 14:05 ` Robin Rosenberg
@ 2006-10-13 15:09 ` Jakub Narebski
0 siblings, 0 replies; 16+ messages in thread
From: Jakub Narebski @ 2006-10-13 15:09 UTC (permalink / raw)
To: Robin Rosenberg; +Cc: git
Robin Rosenberg wrote:
> torsdag 12 oktober 2006 23:21 skrev Jakub Narebski:
>> Robin Rosenberg wrote:
>>> onsdag 11 oktober 2006 23:27 skrev Jakub Narebski:
>>>> Pazu wrote:
>>>>> The XML declaration forces IE6 into quirks mode, breaking our
>>>>> nice standards compliant stylesheet.
>>>>
>>>> But isn't it _required_ by XML/XHTML?
>>>
>>> For pure XML document it is required, but not for XHTML, unless the
>>> encoding is something other than UTF-8 or (shudder) UTF-16. W3C
>>> recommends it though.
>>
>> So what should be our decision? Honor IE quirks ;-) and either remove
>> XML declaration, or use Transitional DTD? Add back SPC to conversion
>> in esc_html? Ignore broken browsers?
>
> It isn't required by the standard. Why not just drop it?
>From http://www.w3.org/TR/xhtml1/#docconf
An XML declaration is not required in all XML documents; however XHTML
document authors are strongly encouraged to use XML declarations in all
their documents. Such a declaration is required when the character
encoding of the document is other than the default UTF-8 or UTF-16 and
no encoding was determined by a higher-level protocol.
So even if it is not required, it is recommended. But yes, removing
<?xml?> for bug-compatibility conformance is better idea than mucking
with browser detection... if we sould need browser detection to avoid
other bugs (like non-W3C CSS box model in IE), then perhaps we could
reintroduce <?xml?> in standards-conforming browsers.
--
Jakub Narebski
Poland
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: Gitweb indentation wrong in Internet Explorer
2006-10-11 17:25 Gitweb indentation wrong in Internet Explorer Ralf Baechle
2006-10-11 17:47 ` Jakub Narebski
@ 2006-10-11 18:13 ` Luben Tuikov
1 sibling, 0 replies; 16+ messages in thread
From: Luben Tuikov @ 2006-10-11 18:13 UTC (permalink / raw)
To: Ralf Baechle, git
--- Ralf Baechle <ralf@linux-mips.org> wrote:
> 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.
Thank you.
Has anyone let MSIE people know about this bug? Or tried latest MSIE?
Luben
>
> *** 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
> -
> 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
>
^ permalink raw reply [flat|nested] 16+ messages in thread
end of thread, other threads:[~2006-10-13 15:09 UTC | newest]
Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-10-11 17:25 Gitweb indentation wrong in Internet Explorer Ralf Baechle
2006-10-11 17:47 ` Jakub Narebski
2006-10-11 18:15 ` Ralf Baechle
2006-10-11 20:53 ` Pazu
2006-10-11 21:13 ` [PATCH] Removes the <?xml?> declaration from gitweb.pl Pazu
2006-10-11 21:27 ` Jakub Narebski
2006-10-12 0:26 ` Pazu
2006-10-12 1:08 ` Pazu
2006-10-12 5:45 ` Robin Rosenberg
2006-10-12 21:21 ` Jakub Narebski
2006-10-13 13:01 ` Pazu
2006-10-13 13:07 ` Jakub Narebski
2006-10-13 14:09 ` Pazu
2006-10-13 14:05 ` Robin Rosenberg
2006-10-13 15:09 ` Jakub Narebski
2006-10-11 18:13 ` Gitweb indentation wrong in Internet Explorer Luben Tuikov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).