Apply quirks mode to token