0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2024-12-23 21:53:55 -05:00
astro/packages
Steven Benner ccc05d5401
Fix build failure when image file name includes special characters (#9781)
The latest version of `vite-plugin-markdown` uses a regular
expression that includes the file path via string concatenation.
However the file path is not escaped for use in a regular
expressions. So if a markdown document includes a reference to an
image file name which includes certain special characters it will
cause the build to fail.

This patch escapes regex special characters in the file path string
being injected into the regular expression. While I found that not
all special characters will cause this problem, it seems safer to
simply escape all regex specials. I also added test to verify this.

Related to: Commit 165cfc154b

Co-authored-by: Erika <3019731+Princesseuh@users.noreply.github.com>
2024-01-23 18:16:56 -05:00
..
astro Fix build failure when image file name includes special characters (#9781) 2024-01-23 18:16:56 -05:00
astro-prism Update all dependencies (#9138) 2023-11-21 12:09:19 +08:00
astro-rss [ci] release (#9728) 2024-01-22 15:11:07 -05:00
create-astro [ci] release (#9625) 2024-01-11 16:32:08 +08:00
integrations fix: vite security issue (#9773) 2024-01-23 20:48:20 +08:00
internal-helpers
markdown/remark [ci] release (#9728) 2024-01-22 15:11:07 -05:00
telemetry Update all dependencies (#9138) 2023-11-21 12:09:19 +08:00
underscore-redirects Update all dependencies (#9138) 2023-11-21 12:09:19 +08:00
upgrade [ci] format 2024-01-12 07:54:11 +00:00