Changed the replacePopupText to replacePopupHTML