Skip to content

Commit

Permalink
PX: escape html in suggestions (#1172)
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianbenz authored Mar 22, 2021
1 parent 0974deb commit 299dc5d
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/page-experience/lib/checks/earlyIframes.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const earlyIframes = (pageData, result) => {
result.addDetails({
headings: [{label: 'src', valueType: 'text', key: 'src'}],
items: pageData.criticalIframes.map((iframeSrc) => {
return {src: iframeSrc};
return {src: `\`${iframeSrc}\``};
}),
});
};
Expand Down
2 changes: 1 addition & 1 deletion packages/page-experience/lib/checks/heroImages.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const heroImages = (pageData, result) => {
headings: [{label: 'Affected images', valueType: 'text', key: 'image'}],
items: heroImageCandidates.map((img) => {
return {
image: `<amp-img data-hero src="${img.src}" layout="${img.src}" width="${img.src}" height="${img.src}" ...>`,
image: `\`<amp-img src="${img.src}" layout="${img.src}" width="${img.src}" height="${img.src}" ...>\``,
};
}),
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
],
"items": [
{
"src": "https://www.google.com/maps/embed/v1/place?key=AIzaSyAyAS599A2GGPKTmtNr9CptD61LE4gN6oQ&q=iceland"
"src": "`https://www.google.com/maps/embed/v1/place?key=AIzaSyAyAS599A2GGPKTmtNr9CptD61LE4gN6oQ&q=iceland`"
}
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
],
"items": [
{
"image": "<amp-img data-hero src=\"/image.jpg\" layout=\"/image.jpg\" width=\"/image.jpg\" height=\"/image.jpg\" ...>"
"image": "`<amp-img src=\"/image.jpg\" layout=\"/image.jpg\" width=\"/image.jpg\" height=\"/image.jpg\" ...>`"
}
]
}
Expand Down

0 comments on commit 299dc5d

Please sign in to comment.