Closed
Bug 788063
Opened 12 years ago
Closed 11 years ago
[socorro-crashstats] html5-tidy template files
Categories
(Socorro :: Webapp, task)
Socorro
Webapp
Tracking
(Not tracked)
VERIFIED
FIXED
57
People
(Reporter: rhelmer, Assigned: espressive)
References
Details
(Whiteboard: [qa-])
Our HTML templates are a mess; let's run html5-tidy on them.
Warnings are ok, but malformed/badly formatted HTML just makes our life harder.
Reporter | ||
Comment 1•12 years ago
|
||
I already have this done, but it's disruptive so I'd like to land outstanding PRs before we do this.
Comment 2•12 years ago
|
||
I still don't get this. We can't run tidy on the templates because they're not HTML. They're jinja. And we can't run it on the output because the output doesn't really exist. We'd have to have a middleware that's run last that tidies up the HTML output and that would be terribly slow.
Reporter | ||
Comment 3•12 years ago
|
||
(In reply to Peter Bengtsson [:peterbe] from comment #2)
> I still don't get this. We can't run tidy on the templates because they're
> not HTML. They're jinja. And we can't run it on the output because the
> output doesn't really exist. We'd have to have a middleware that's run last
> that tidies up the HTML output and that would be terribly slow.
My plan is to run html5-tidy on the template files, first manually changing {{ }} and {% %} to <%= %> <% %> respectively (html5-tidy's parser already supports template languages like PHP and JSP, I looked into adding jinja support but the parser makes a lot of assumptions about angle brackets so it'd be non-trivial)
Then I will go over the files by hand and remove the header/footer and reformat the jinja tags as appropriate (since it doesn't do much to format inside there)
As I said, this is definitely a one-time thing.. we'll want to get linters up running middleware on jenkins to keep it from backsliding, and not have to do this again.
Comment 4•12 years ago
|
||
Sounds risky. Mind you the {# comments #} too.
Best of luck. I suspect you'll catch a couple of things at least.
I'm not convinced about a middleware that only runs on jenkins. We can talk about that later.
Reporter | ||
Comment 5•12 years ago
|
||
(In reply to Peter Bengtsson [:peterbe] from comment #4)
> Sounds risky. Mind you the {# comments #} too.
>
> Best of luck. I suspect you'll catch a couple of things at least.
The thing is, the templates are so small I could do this all by hand if I had to, I think it's worth letting the tool help a bit. I expect to just run through all the templates and make sure it looks kosher, so it just will save the tedium of doing this all by hand.
> I'm not convinced about a middleware that only runs on jenkins. We can talk
> about that later.
Yep that is for bug 788082 (not blocking staging)
Updated•12 years ago
|
Whiteboard: [qa-]
Reporter | ||
Updated•12 years ago
|
Reporter | ||
Updated•12 years ago
|
Assignee | ||
Updated•11 years ago
|
Assignee: nobody → schalk.neethling.bugs
Assignee | ||
Comment 7•11 years ago
|
||
Sent pull request: https://github.com/mozilla/socorro/pull/1433
Comment 8•11 years ago
|
||
Commit pushed to master at https://github.com/mozilla/socorro
https://github.com/mozilla/socorro/commit/43e97e1f83a069f6da9f129234dc582182024f32
Merge pull request #1433 from ossreleasefeed/bug788063-ensure-templates-use-valid-html
Fix Bug 778063, ensure all pages validates against w3c validator
Assignee | ||
Updated•11 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Assignee | ||
Updated•11 years ago
|
Target Milestone: --- → 57
Assignee | ||
Updated•11 years ago
|
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•