Expand description
RFC 2397 data: URL parsing.
Rules: the scheme is matched case-insensitively; the first comma separates
the header from the payload; a base64 parameter (case-insensitive) marks
a base64 payload, which is percent-decoded, stripped of ASCII whitespace
and decoded with padding optional; other payloads are percent-decoded; an
empty media type defaults to text/plain;charset=US-ASCII; media type
parameters other than base64 are kept.
Structs§
- DataUrl
- A parsed
data:URL.
Constants§
- DEFAULT_
MEDIA_ TYPE - Media type used when a data URL omits it.
Functions§
- is_
data_ url - Returns
truewheninputstarts with thedata:scheme. - parse
- Parses a
data:URL.