Fix encode regex and names in local storage for purge