Escape special characters in generated CSS selectors