Skip to content

Commit

Permalink
Merge pull request #445 from snianu/update-unsanitized-html-2
Browse files Browse the repository at this point in the history
Clarify the exception text.
  • Loading branch information
snianu authored Oct 10, 2023
2 parents dbf1ee7 + 3bcd9bc commit 19a55aa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/clipboard-unsanitized/explainer.md
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ EndFragment:<start offset of the end fragment comment tag>
### Read()
Follow the algorithm specified in [read()](https://w3c.github.io/clipboard-apis/#dom-clipboard-read) except for the below steps:
1. If `text/html` representation is present in the [ClipboardItem](https://w3c.github.io/clipboard-apis/#clipboard-item-interface) and `text/html` is present in the `unsanitized` list, then follow the below steps:
1. If size of `unsanitized` list is greater than 1, then throw `Support to read multiple unsanitized formats is not supported.` exception.
1. If size of `unsanitized` list is greater than 1, then throw `Reading multiple unsanitized formats is not supported.` exception.
2. If `text/html` is not at the first position in the `unsanitized` list, then throw `The unsanitized type` {formatName} `is not supported.` exception.
3. else, return the blobData as-is without any sanitization.
2. Else, follow the existing sanitization behavior as mentioned in [step-3](https://w3c.github.io/clipboard-apis/#dom-clipboard-read).
Expand Down

0 comments on commit 19a55aa

Please sign in to comment.