-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HTML modes create "dirty" HTML #22
Comments
In case XML syntax is desired shouldn't user just use XML mode? HTML allows for unclosed tags and actually deprecates self closing tags, but if I remember correctly kajiki XML mode does actually what you want to achieve. |
There are a couple of things that don't really cope well with the differences between HTML and XML (when delivered with an XML content type to the browser), e.g. some third-party Javascript modules expect tags to be uppercase in the DOM. HTML5 explicitly allows self-closing void start tags, so I guess I'm in the clear there (except maybe for the suggested shortcut to using FontAwesome icons, i.e. a self-closing Is there a way to use Kajiki XML mode in Turbogears and have it delivered as |
I'm not saying that self closed tags are wrong, jus that they are not required and they are actually just ignored for void elements, so kajiki is doing the right thing in HTML mode as those tags are self closing in any case. Regarding how to switch kajiki to xml mode setting in turbogears |
They're not required for HTML, but they're good if you want the rendered content not make stuff expecting XML go belly up (say the XML mode of your editor trying to balance out tags, or indent things intelligently 😉). I'm not expecting Kajiki to self-close all void start tags, only to preserve it if I do it in the template. I'll try what you suggested about forcing Kajiki to use XML mode in TG, but as I said above, it needs to be delivered with content type |
So, setting That leaves me only issue #21 before I can make the switch :). |
Kajiki's HTML modes default to produce "dirty" HTML, e.g. unclosed
You can say many things about Genshi, but the (X)HTML it renders is beautiful. I realize that Kajiki uses a totally different way to create the templates which might make "staying close to the original template" difficult, but it should at least preserve closed and shortened end tags.
The text was updated successfully, but these errors were encountered: