def extract_url_information(url):
    """Return a dictionary containing URL-specific information."""
    protocol = url[:url.index(':')].replace('&', '&amp;')
    post_protocol = url.index('//')
    post_domain = url.index('/', post_protocol + 2)
    domain = url[post_protocol + 2:post_domain]
    path = url[post_domain:].replace('&', '&amp;')
    return {'url': url.replace('&', '&amp;'),
            'path': path,
            'domain': domain,
            'protocol': protocol}