def parse_url_query(query):
    """Parse url query string.

    Returns a dictionary of field names and their values.

    Args:
        query (str): url query string

    Returns:
        Dict[str,str]

    """
    ret = {}
    for i in query.split('&'):
        if not i:
            continue
        temp = i.split('=')
        if not temp[0]:
            continue
        ret[temp[0]] = temp[1] if len(temp) > 1 else None
    return ret