Skip to content

Commit 1be4027

Browse files
Added example showing normal text characters can also be percent-encoded
1 parent 1ee2cfe commit 1be4027

File tree

1 file changed

+2
-0
lines changed
  • files/en-us/web/uri/reference/schemes/data

1 file changed

+2
-0
lines changed

files/en-us/web/uri/reference/schemes/data/index.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ A few examples:
3131

3232
- `data:,Hello%2C%20World%21`
3333
- : The text/plain data `Hello, World!`. Note how the comma is {{Glossary("Percent-encoding", "percent-encoded")}} as `%2C`, and the space character as `%20`.
34+
- `data:text/plain,Hello%2C%20%57%6F%72%6C%64%21`
35+
- : The text/plain data `Hello, World!` that also has `World` escaped. Similar to {{jsxref("decodeURIComponent()")}}, it decodes all {{Glossary("Percent-encoding", "percent-encoded")}} characters, even if they don't have to be escaped.
3436
- `data:text/plain;base64,SGVsbG8sIFdvcmxkIQ==`
3537
- : base64-encoded version of the above
3638
- `data:text/html,%3Ch1%3EHello%2C%20World%21%3C%2Fh1%3E`

0 commit comments

Comments
 (0)