5 ms·
I find the most interesting part how < and especially “ don’t need to be escaped inside the href attribute. How does the HTML parser know when the attribute sto
by legulere 5y ago
I find the most interesting part how < and especially “ don’t need to be escaped inside the href attribute. How does the HTML parser know when the attribute stops?
- svieira 5y agoI don't think it's actually valid - the examples just aren't base64-encoding in order to make it possible to read them easily. Edit: Yeah, you at least need to change the `"` to `'` in the inline SVG before it will parse correctly (tested in Firefox)
- account42 5y agoYou need to escape special characters, but you do not need to base64-encode SVG, which gives it a slight advantage over binary formats in data URLs.