Skip to content

Creating a URL with invalid characters should raise an error #17

@telday

Description

@telday

Currently creating a Data URL with data that contains invalid characters will successfully return a DataURL object. It should not do this and instead either return None or raise an error.

from data_url import DataURL
url = DataURL.from_data("text/plain", False, "Hello World!")
print(url.url)  # Prints "data:text/plain,Hello World!", not a valid data URL!

Related to PR #16

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions