sanitize pageId variable