Fixed replace-entity and added replace-entities as well as with-replaced-entities. Subsequently fixed text-with-expanded-urls and text-with-markup.