'HTML5 specific normalizations to the token stream'

def normalizeToken(self, token):

    if (token[u'type'] == tokenTypes[u'StartTag']):
        raw = token[u'data']
        token[u'data'] = OrderedDict(raw)
        if (len(raw) > len(token[u'data'])):
            token[u'data'].update(raw[::(-1)])
    return token
