Changed the way replace_all works, so that it works smoothly with html