NanoBlogger 3.1 XHTML1.1 Compliance Patch
Posted: May 2nd, 2005 | Author: amake | Filed under: Software | No Comments »I use NanoBlogger 3.1 as my content management system, and I like it very much. Just one thing bugged me: By default it creates XHTML1.0-compliant code, when it could very easily generate 1.1-compliant code. I did a little poking around and fixed the following issues:
- The name attribute is deprecated in XHTML1.1; id serves the same purpose.
- align=”center” is deprecated in favor of the CSS style=”text-align: center;”
- Added the XHTML1.1 doctype declaration, leading xml info header, and language identifier for the html tag
- More than one
had id=”menu” so I changed them from IDs to classes and added .menu to the #menu CSS styles
- You can’t have a
outside of a block-level element, or something like that. My solution was to remove the
‘s at the end of the templates, but I suppose you could also just throw it in a div. In that case you’d also have to replace clear=”all” with style=”clear: both;”, as the clear attribute is also deprecated in favor of CSS.I submitted this patch to the developer quite a while ago, but no new versions have come out recently so I thought I’d publish it. You can download it if you like. Apply it by first backing up your nanoblogger folder, then cd-ing into it and running patch -p1 .
It looks like the currently unreleased NanoBlogger 3.2 will be XHTML1.1-compliant, though, so this may not be worth bothering with unless you’re pretty anal, like me.
- You can’t have a
Leave a Reply