Function data_url::pretend_parse_data_url
source ยท pub(crate) fn pretend_parse_data_url(input: &str) -> Option<&str>
Expand description
Similar to https://url.spec.whatwg.org/#concept-basic-url-parser followed by https://url.spec.whatwg.org/#concept-url-serializer
-
None
: not a data URL. -
Some(s)
: sort of the result of serialization, except:data:
prefix removed- The fragment is included
- Other components are not UTF-8 percent-encoded
- ASCII tabs and newlines in the middle are not removed