From 5da8ced155b86dd3adc4d82b203ae45517321f01 Mon Sep 17 00:00:00 2001 From: Caleb Raitto Date: Mon, 11 Dec 2023 16:33:35 -0500 Subject: [PATCH] [Spec] Fix build Bikeshed was updated recently to add new warnings around HTML & escape sequences -- use backtick blocks to put the problematic strings in tags so that no escaping is necessary. Also, fix wrapping of touched lines (should be 100 columns). --- spec.bs | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/spec.bs b/spec.bs index b7924e2cd..25180d82f 100644 --- a/spec.bs +++ b/spec.bs @@ -2028,27 +2028,28 @@ To build trusted bidding signals url given a [=URL=] |signalsUrl|, an |experimentGroupId|, and an [=origin=] |topLevelOrigin|: 1. Let |queryParamsList| be a new empty [=list=]. - Note: These steps create a [=url/query=] of the form "`&=`". E.g., - "`hostname=publisher1.com&keys=key1,key2&interestGroupNames=ad+platform,name2&experimentGroupId=1234`". -

These steps don't use the [=urlencoded serializer|application/x-www-form-urlencoded serializer=] - to construct the query string because it repeats a key if it has multiple values instead of a - comma-demilited list (e.g., "keys=key1&keys=key2", instead of "keys=key1,key2"), and it also - uses a different percent encode set from the Chrome implementation. + Note: These steps create a [=url/query=] of the form "`&=`". + E.g., "`hostname=publisher1.com&keys=key1,key2&interestGroupNames=ad+platform,name2&experimentGroupId=1234`". +

These steps don't use the [=urlencoded serializer|application/x-www-form-urlencoded + serializer=] to construct the query string because it repeats a key if it has multiple values + instead of a comma-demilited list (e.g., "`keys=key1&keys=key2`", instead of + "`keys=key1,key2`"), and it also uses a different percent encode set from the Chrome + implementation. 1. [=list/Append=] "hostname=" to |queryParamsList|. 1. [=list/Append=] the result of [=string/UTF-8 percent-encoding=] the [=serialization of an origin|serialized=] |topLevelOrigin| using [=component percent-encode set=] to |queryParamsList|. 1. If |keys| is not [=set/is empty|empty=]: - 1. [=list/Append=] "&keys=" to |queryParamsList|. + 1. [=list/Append=] "`&keys=`" to |queryParamsList|. 1. [=list/Extend=] |queryParamsList| with the result of [=encode trusted signals keys=] with |keys|. 1. If |igNames| is not [=set/is empty|empty=]: - 1. [=list/Append=] "&interestGroupNames=" to |queryParamsList|. + 1. [=list/Append=] "`&interestGroupNames=`" to |queryParamsList|. 1. [=list/Extend=] |queryParamsList| with the result of [=encode trusted signals keys=] with |igNames|. 1. If |experimentGroupId| is not null: - 1. [=list/Append=] "&experimentGroupId=" to |queryParamsList|. + 1. [=list/Append=] "`&experimentGroupId=`" to |queryParamsList|. 1. [=list/Append=] [=serialize an integer|serialized=] |experimentGroupId| to |queryParamsList|. 1. Let |fullSignalsUrl| be |signalsUrl|. 1. Set |fullSignalsUrl|'s [=url/query=] to the result of [=string/concatenating=] |queryParamsList|. @@ -2069,15 +2070,15 @@ Note: When trusted scoring signals fetches are not batched, |renderURLs|'s [=lis 1. [=list/Append=] the result of [=string/UTF-8 percent-encoding=] |topLevelOrigin| using [=component percent-encode set=] to |queryParamsList|. 1. If |renderURLs| is not [=set/is empty|empty=]: - 1. [=list/Append=] "&renderURLs=" to |queryParamsList|. + 1. [=list/Append=] "`&renderURLs=`" to |queryParamsList|. 1. [=list/Extend=] |queryParamsList| with the result of [=encode trusted signals keys=] with |renderURLs|. 1. If |adComponentRenderURLs| is not [=set/is empty|empty=]: - 1. [=list/Append=] "&adComponentRenderURLs=" to |queryParamsList|. + 1. [=list/Append=] "`&adComponentRenderURLs=`" to |queryParamsList|. 1. [=list/Extend=] |queryParamsList| with the result of [=encode trusted signals keys=] with |adComponentRenderURLs|. 1. If |experimentGroupId| is not null: - 1. [=list/Append=] "&experimentGroupId=" to |queryParamsList|. + 1. [=list/Append=] "`&experimentGroupId=`" to |queryParamsList|. 1. [=list/Append=] [=serialize an integer|serialized=] |experimentGroupId| to |queryParamsList|. 1. Set |signalsUrl|'s [=url/query=] to the result of [=string/concatenating=] |queryParamsList|. 1. return |signalsUrl|.