Skip to content

Commit e4f1956

Browse files
committed
Use replaceAll instead of replace
1 parent 057d34e commit e4f1956

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

dotcom-rendering/src/server/htmlPageTemplate.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -364,8 +364,8 @@ https://workforus.theguardian.com/careers/product-engineering/
364364
? `
365365
<noscript>
366366
<!-- Comscore Identifier: comscorekw=${props.keywords
367-
.replace(/ /g, '_')
368-
.replace(/&/g, 'and')} -->
367+
.replaceAll(' ', '_')
368+
.replaceAll('&', 'and')} -->
369369
<img src="https://sb.scorecardresearch.com/p?${new URLSearchParams(
370370
{
371371
c1: '2',
@@ -374,8 +374,8 @@ https://workforus.theguardian.com/careers/product-engineering/
374374
cj: '1',
375375
cs_ucfr: '0',
376376
comscorekw: props.keywords
377-
.replace(/ /g, '_')
378-
.replace(/&/g, 'and'),
377+
.replaceAll(' ', '_')
378+
.replaceAll('&', 'and'),
379379
},
380380
).toString()}" />
381381
</noscript>

0 commit comments

Comments
 (0)