added dedup for replace email/url so that same replacement won't corrupt the page. I am also hoping this will fix the out of memory issue