prevent issues with css selectors containing braces.

See https://code.google.com/p/cssjanus/issues/detail?id=22.
This has lready fixed in MediaWiki php port - https://doc.wikimedia.org/mediawiki-core/master/php/html/CSSJanus_8php_source.html