Unverified Commit cee2cf37 authored by JJ Kasper's avatar JJ Kasper Committed by GitHub

Ensure dangerouslyAllowSVG is passed correctly (#39031)

parent fd7bd124
......@@ -1571,6 +1571,7 @@ export default async function getBaseWebpackConfig(
imageSizes: config.images.imageSizes,
path: config.images.path,
loader: config.images.loader,
dangerouslyAllowSVG: config.images.dangerouslyAllowSVG,
experimentalUnoptimized: config?.experimental?.images?.unoptimized,
experimentalFuture: config.experimental?.images?.allowFutureImage,
...(dev
......
......@@ -321,9 +321,8 @@ module.exports = (context) => {
try {
browser = await webdriver(context.appPort, '/svg-image')
await browser.eval(`document.getElementById("img").scrollIntoView()`)
expect(
await browser.elementById('img').getAttribute('src')
).toContain('xss.svg')
const src = await browser.elementById('img').getAttribute('src')
expect(src).toMatch(/_next\/image\?.*xss\.svg/)
expect(await browser.elementById('msg').text()).toBe('safe')
browser = await webdriver(
context.appPort,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment