Revised code for editing HTML on page when public profile is edited