Skip to content

Commit a1c565f

Browse files
authored
Merge pull request #281 from w3c/strip_url
Add strip URL as an exported algorithm
2 parents b8418ea + 93dd83b commit a1c565f

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

index.bs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -646,6 +646,22 @@ spec: STRUCTURED-FIELDS; urlPrefix: https://www.rfc-editor.org/rfc/rfc8941.html#
646646
Endpoint`".
647647

648648
8. Return "`Failure`".
649+
650+
<h3 id="strip-url-for-use-in-reports-heading">Strip URL for use in reports</h3>
651+
To <dfn algorithm export>strip URL for use in reports</dfn> given a [=/URL=] |url|,
652+
perform the following steps. They return a string representing the URL for use in reports.
653+
654+
1. If |url|'s <a for="url">scheme</a> is not an <a>HTTP(S) scheme</a>,
655+
then return |url|'s <a for="url">scheme</a>.
656+
657+
2. Set |url|’s <a for="url">fragment</a> to the empty string.
658+
659+
3. Set |url|’s <a for="url">username</a> to the empty string.
660+
661+
4. Set |url|’s <a for="url">password</a> to the empty string.
662+
663+
5. Return the result of executing the <a>URL serializer</a> on |url|.
664+
649665
</section>
650666

651667
<section>

0 commit comments

Comments
 (0)