Hi, I'm having some issues with converting the doctype to HTML5, any help is appreciated. Basically I've modified all the BH templates, but the doctype still came up as XHTML strict. I've tracked the problem to trac's template rendering, which seems to force XHTML without any regard to what's actually specified in the template - the offending function is Chrome's render_template() in web/chrome.py.
I tried to override this behaviour by prepending a DocTypeInserter filter to the stream, but that doesn't work either - the doctype from trac always comes first in line, and any subsequent doctypes are ignored by the serializer. Would it be possible to do this in the post processing phase, i.e. IRequestFilter's post_process_request()? If not, is there any way of overriding trac's behaviour without modifying trac itself? -- matevz On Mon, Nov 26, 2012 at 9:51 AM, Matevz Bradac <[email protected]> wrote: > So I suppose we should first focus on cleaning up the current > situation and then move on to #217. > If agreed, I'll open a new ticket for the cleanup and start working on > that first. > > -- > matevz > > On Mon, Nov 26, 2012 at 9:46 AM, Joe Dreimann > <[email protected]> wrote: >> To my knowledge all relevant browsers (including IE6 etc) will display HTML >> 5 pages (using quirks mode), more information here: >> http://stackoverflow.com/questions/3911235/html-5-doctype-and-ie-6 >> >> In my opinion this is not an issue, we should be fine to use HTML 5. >> >> Joe >> >> ________________________ >> @jdreimann - Twitter >> Sent from my phone >> >> On 26 Nov 2012, at 07:03, Peter Koželj <[email protected]> wrote: >> >>> The other thread "Inline editing of objects" (for the Ticket page) suggest >>> fallback mechanism for javascript disabled browsers. >>> Although this is not directly linked I would rather "advertise" BH as HTML5 >>> UI experience than a no-javascript capable one. >>> >>> Is anybody aware of any browser that is actually incapable of displaying >>> HTML5 page? >>> >>> Peter >>> >>> On 25 November 2012 20:07, Matevz Bradac <[email protected]> wrote: >>> >>>> Hi, >>>> >>>> I've started working on #217 - "Make Bloodhound's layout responsive", >>>> based on Joe's html mockup of the ticket page (#240). >>>> I noticed that the HTML output contains a mix of HTML 5 along with >>>> XHTML 1.0, even though the doctype is XHTML 1.0 strict. >>>> As a consequence (some of) the pages don't validate (e.g. >>>> >>>> http://validator.w3.org/check?uri=https://issues.apache.org/bloodhound/ticket/240 >>>> ), >>>> and this may be the cause of browsers (mis)behaving and rendering >>>> things differently. >>>> >>>> Is there any general consensus which doctype BH should use? Since >>>> we're using Bootstrap I suppose it would be better to go along >>>> with HTML 5, but I'm not sure how this affects the templating system. >>>> There's a Genshi extension which could be used >>>> (http://code.google.com/p/genshihtml5), >>>> does anyone have any experience with that? >>>> >>>> Cheers, >>>> matevz >>>>
