Skip to content

Commit 38ee728

Browse files
shakyShanegithub-actions[bot]
authored andcommitted
Release build 4.59.2 [ci release]
1 parent 0b68b0d commit 38ee728

File tree

6 files changed

+13
-5
lines changed

6 files changed

+13
-5
lines changed

Sources/ContentScopeScripts/dist/contentScopeIsolated.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5108,7 +5108,7 @@
51085108
*/
51095109
return String(input).replace(/\$%7B(.+?)%7D|\$\{(.+?)}/g, (match, encodedValue, plainValue) => {
51105110
const comparison = encodedValue ?? plainValue;
5111-
const [dataKey, ...transforms] = comparison.split('|');
5111+
const [dataKey, ...transforms] = comparison.split(/\||%7C/);
51125112
const data = userData[dataKey];
51135113
return applyTransforms(dataKey, data, transforms, action)
51145114
})

build/contentScope.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14993,7 +14993,7 @@
1499314993
*/
1499414994
return String(input).replace(/\$%7B(.+?)%7D|\$\{(.+?)}/g, (match, encodedValue, plainValue) => {
1499514995
const comparison = encodedValue ?? plainValue;
14996-
const [dataKey, ...transforms] = comparison.split('|');
14996+
const [dataKey, ...transforms] = comparison.split(/\||%7C/);
1499714997
const data = userData[dataKey];
1499814998
return applyTransforms(dataKey, data, transforms, action)
1499914999
})

build/integration/contentScope.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14993,7 +14993,7 @@
1499314993
*/
1499414994
return String(input).replace(/\$%7B(.+?)%7D|\$\{(.+?)}/g, (match, encodedValue, plainValue) => {
1499514995
const comparison = encodedValue ?? plainValue;
14996-
const [dataKey, ...transforms] = comparison.split('|');
14996+
const [dataKey, ...transforms] = comparison.split(/\||%7C/);
1499714997
const data = userData[dataKey];
1499814998
return applyTransforms(dataKey, data, transforms, action)
1499914999
})

build/windows/contentScope.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10331,7 +10331,7 @@
1033110331
*/
1033210332
return String(input).replace(/\$%7B(.+?)%7D|\$\{(.+?)}/g, (match, encodedValue, plainValue) => {
1033310333
const comparison = encodedValue ?? plainValue;
10334-
const [dataKey, ...transforms] = comparison.split('|');
10334+
const [dataKey, ...transforms] = comparison.split(/\||%7C/);
1033510335
const data = userData[dataKey];
1033610336
return applyTransforms(dataKey, data, transforms, action)
1033710337
})

src/features/broker-protection/actions/build-url-transforms.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ export function processTemplateStringWithUserData (input, action, userData) {
139139
*/
140140
return String(input).replace(/\$%7B(.+?)%7D|\$\{(.+?)}/g, (match, encodedValue, plainValue) => {
141141
const comparison = encodedValue ?? plainValue
142-
const [dataKey, ...transforms] = comparison.split('|')
142+
const [dataKey, ...transforms] = comparison.split(/\||%7C/)
143143
const data = userData[dataKey]
144144
return applyTransforms(dataKey, data, transforms, action)
145145
})

unit-test/broker-protection.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,14 @@ describe('Actions', () => {
247247
expect(result).toEqual({ url: 'https://example.com/profile/John-Smith/a/b/c/search?state=il&city=Chicago&fage=24' })
248248
})
249249

250+
it('should handle url encodings', () => {
251+
const result = replaceTemplatedUrl({
252+
id: 0,
253+
url: 'https://example.com/name/$%7BfirstName%7Cdowncase%7D-$%7BlastName%7Cdowncase%7D/$%7Bcity%7Cdowncase%7D-$%7Bstate%7CstateFull%7Cdowncase%7D?age=$%7Bage%7D'
254+
}, userData)
255+
expect(result).toEqual({ url: 'https://example.com/name/john-smith/chicago-illinois?age=24' })
256+
})
257+
250258
it('should build url when given valid data from path segments with modifiers path and url', () => {
251259
const result = replaceTemplatedUrl({
252260
id: 0,

0 commit comments

Comments
 (0)