xhtml compatibility
Merge pull request #2256 from mkurz/xhtml_fix

xhtml compatibility