author | Jakub Narebski <jnareb@gmail.com> | |
Wed, 25 Nov 2009 00:45:15 +0000 (01:45 +0100) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Wed, 25 Nov 2009 08:04:39 +0000 (00:04 -0800) | ||
commit | 6aa2de51511bf847f6e69dfcfc9e7d977ef171a6 | |
tree | 8b27dae504c324a1853033ea2dac94f1d40139cc | tree | snapshot |
parent | e42a05f75c9ff5d10d0b8f6784fc244873818a99 | commit | diff |
gitweb.js: Harden setting blamed commit info in incremental blame
Internet Explorer 8 stops at beginning of blame filling with the
following bug:
"firstChild is null or not an object"
at this line:
a_sha1.firstChild.data = commit.sha1.substr(0, 8);
It is (probably) caused by the fact that while a_sha1 element, which
looks like this:
<a href=""> </a>
It has a firstChild which is a text node containing only whitespace
(single space character) in other web browsers (Firefox 3.5, Opera 10,
Google Chrome 3.0), IE8 clobbers DOM, removing trailing/leading
whitespace.
Protect against this bug by creating text element if it does not
exist.
Found-by: Stephen Boyd <bebarino@gmail.com>
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Internet Explorer 8 stops at beginning of blame filling with the
following bug:
"firstChild is null or not an object"
at this line:
a_sha1.firstChild.data = commit.sha1.substr(0, 8);
It is (probably) caused by the fact that while a_sha1 element, which
looks like this:
<a href=""> </a>
It has a firstChild which is a text node containing only whitespace
(single space character) in other web browsers (Firefox 3.5, Opera 10,
Google Chrome 3.0), IE8 clobbers DOM, removing trailing/leading
whitespace.
Protect against this bug by creating text element if it does not
exist.
Found-by: Stephen Boyd <bebarino@gmail.com>
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
gitweb/gitweb.js | diff | blob | history |