Speed up a little html encoding detection

Not sure this is a smart move