I have a case with computer-generated class names where it could be that the class name might contain a space character (I don't have direct control over the IDs that are turned into class names). I figured out how to escape all characters in CSS (see the excellent answers in Which characters are valid in CSS class names/selectors? and http://mathiasbynens.be/notes/css-escapes).
But I didn't manage to get a space character escaped in a CSS class name in the HTML code.
I now used a solution that avoids spaces, but I'm curious nevertheless if / how it would be possible to escape the space character in the class attribute value.
E.g.: my class name is "a b"
.
I can write a CSS selector in CSS as .a\20 b { }
.
But using  
in the attribute such as <div class="a b"/>
will be interpreted the same as <div class="a b"/>
and this defines two classes.