Closed Bug 275416 Opened 20 years ago Closed 20 years ago

Safari cannot recognise CSS classes that have newlines in them

Categories

(Bugzilla :: Bugzilla-General, defect)

2.17.7
PowerPC
macOS
defect
Not set
trivial

Tracking

()

RESOLVED DUPLICATE of bug 274400

People

(Reporter: spam, Assigned: spam)

Details

Attachments

(1 file, 2 obsolete files)

The file table.html.tmpl uses the following code to generate the pretty colours in the buglist:
----
 <tr class="bz_[% bug.bug_severity FILTER css_class_quote %]
            bz_[% bug.priority FILTER css_class_quote %]
            bz_[% bug.bug_status FILTER css_class_quote %]
            bz_[% bug.resolution FILTER css_class_quote %]
            [%+ "bz_secure" IF bug.isingroups %]">
----

...very clean, and works well enough, but on Mac OS X, Safari does not display any styles on the bugs at 
all.  I tracked this down to Safari being disgruntled about newlines in the classnames, changing it to the 
(much, much) uglier:

----
 <tr class="bz_[% bug.bug_severity FILTER css_class_quote %] bz_[% bug.priority FILTER css_class_quote 
%] bz_[% bug.bug_status FILTER css_class_quote %] bz_[% bug.resolution FILTER css_class_quote %] [%+ 
"bz_secure" IF bug.isingroups %]">
 ----

...works as expected.  This is confirmed as existing in 2.17.7 and HEAD.  Probably elsewhere, too, but I 
didn't look.  ;)
If bug 274440 was a 2.18 blocker, this one probably should be too.

Nick's fix on that bug can probably be applied here just about as easily.
Flags: approval2.18?
Attached patch table.html.tmpl.patch (obsolete) — Splinter Review
This turns what was beautiful and broken into something hideous and functional.
Flags: blocking2.20?
Flags: blocking2.18?
Flags: approval2.18?
Comment on attachment 169225 [details] [diff] [review]
table.html.tmpl.patch

Nicolas; see nick barnes' patch on bug 274440 to see how to make it "beautiful
and functional"  -- at least as far as the TT code goes. They both look the
same in the resultant HTML, but there's no need to make the programmers' eyes
bleed. :)
Attachment #169225 - Flags: review-
(In reply to comment #3)
> Nicolas; see nick barnes' patch on bug 274440...

That should read bug 274400 -- oops. Sorry.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Attached patch table.html.tmpl.patch (remix) (obsolete) — Splinter Review
Touche.  Here is a version that works in Safari and does not cause undue pain
and suffering...
Attachment #169225 - Attachment is obsolete: true
Comment on attachment 169227 [details] [diff] [review]
table.html.tmpl.patch (remix)

+	      [%+ "bz_secure" IF bug.isingroups -%]">

The "-" on this last line is unnecessary, because there is no line break
between %] and ">

This *probably* wouldn't have any additional negative effect, but it's
extraneous and unneeded... so no point taking any chances.

Fix that trivial issue for an r+ from me.
Attachment #169227 - Flags: review-
Assignee: justdave → spam
Version of the patch with no extra "-" signs in it.  ;)
Attachment #169227 - Attachment is obsolete: true
Flags: blocking2.20?
Flags: blocking2.20+
Flags: blocking2.18?
Flags: blocking2.18+
Target Milestone: --- → Bugzilla 2.18
Nicolas, I owe you an apology. On cursory examination, I thought that bug 
274400 was different from this bug, but it's not; they both target *exactly the 
same code*. 

Your third patch didn't apply to 2.18rc3; when I looked to see why, it's 
because the changes had already been made by someone else! Using 
http://bonsai.mozilla.org/cvsguess.cgi?file=table.html.tmpl to pull up the 
file, I found that they had been checked in as part of bug 277440.

At least you know that this fix *has* made it in to 2.18 ... but I apologize 
for the extra, unnecessary work on your part.


*** This bug has been marked as a duplicate of 274400 ***
Status: NEW → RESOLVED
Closed: 20 years ago
Flags: blocking2.20+
Flags: blocking2.18+
Resolution: --- → DUPLICATE
clearing target of DUPLICATE/WONTFIX/INVALID/WORKSFORME so they'll show up as
untriaged if they get reopened.
Target Milestone: Bugzilla 2.18 → ---
QA Contact: matty_is_a_geek → default-qa
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: