def clean_page_path(page_path, sep='#'):
    """
    We want to remove double slashes and replace them with single slashes, and we only want the page_path before a #
    :param page_path:
    :param sep: default '#' that we want to get rid of, we use rsplit to take away the right-most part of the string
    :return: a nice clean page_path, more hope of matching to our content ID mapping
    """
    return page_path.replace('//', '/').rsplit(sep, 1)[0]