def _norm_url(url):
    """Returns the supplied URL in "canonical" form for a course URL."""
    url = url.strip()  # No leading/trailing whitespace.
    if not url:
        return '/'  # Special-case 'Power Searching with Google' sample.
    if url[0] != '/':
        url = '/' + url  # Prepend missing leading URL path delimiter.
    url = url.split()[0]  # Any text after 1st space in elem is not URL.
    return url