Sped up html-escaping (on strings with nothing to escape) by testing the string before we attempt the actual regex replace.