mirror of
https://github.com/withastro/astro.git
synced 2024-12-16 21:46:22 -05:00
fix: escape image filenames (#12697)
This commit is contained in:
parent
163cfd67f5
commit
1c4a032247
4 changed files with 8 additions and 1 deletions
5
.changeset/famous-teachers-hug.md
Normal file
5
.changeset/famous-teachers-hug.md
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
'astro': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Fix a bug that caused builds to fail if an image had a quote mark in its name
|
|
@ -102,7 +102,7 @@ export class MutableDataStore extends ImmutableDataStore {
|
||||||
const exports: Array<string> = [];
|
const exports: Array<string> = [];
|
||||||
this.#assetImports.forEach((id) => {
|
this.#assetImports.forEach((id) => {
|
||||||
const symbol = importIdToSymbolName(id);
|
const symbol = importIdToSymbolName(id);
|
||||||
imports.push(`import ${symbol} from '${id}';`);
|
imports.push(`import ${symbol} from ${JSON.stringify(id)};`);
|
||||||
exports.push(`[${JSON.stringify(id)}, ${symbol}]`);
|
exports.push(`[${JSON.stringify(id)}, ${symbol}]`);
|
||||||
});
|
});
|
||||||
const code = /* js */ `
|
const code = /* js */ `
|
||||||
|
|
BIN
packages/astro/test/fixtures/content-layer/images/I'm back.jpg
vendored
Normal file
BIN
packages/astro/test/fixtures/content-layer/images/I'm back.jpg
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 56 KiB |
|
@ -3,6 +3,8 @@ title: Endeavour
|
||||||
description: 'Learn about the Endeavour NASA space shuttle.'
|
description: 'Learn about the Endeavour NASA space shuttle.'
|
||||||
publishedDate: 'Sun Jul 11 2021 00:00:00 GMT-0400 (Eastern Daylight Time)'
|
publishedDate: 'Sun Jul 11 2021 00:00:00 GMT-0400 (Eastern Daylight Time)'
|
||||||
tags: [space, 90s]
|
tags: [space, 90s]
|
||||||
|
heroImage: "@images/I'm back.jpg"
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
**Source:** [Wikipedia](https://en.wikipedia.org/wiki/Space_Shuttle_Endeavour)
|
**Source:** [Wikipedia](https://en.wikipedia.org/wiki/Space_Shuttle_Endeavour)
|
||||||
|
|
Loading…
Reference in a new issue