diff --git a/packages/astro/src/content/runtime.ts b/packages/astro/src/content/runtime.ts index b3089275c8..b5e3eb986d 100644 --- a/packages/astro/src/content/runtime.ts +++ b/packages/astro/src/content/runtime.ts @@ -1,4 +1,5 @@ import type { MarkdownHeading } from '@astrojs/markdown-remark'; +import { escape } from 'html-escaper'; import { Traverse } from 'neotraverse/modern'; import pLimit from 'p-limit'; import { ZodIssueCode, z } from 'zod'; @@ -6,7 +7,6 @@ import type { GetImageResult, ImageMetadata } from '../assets/types.js'; import { imageSrcToImportId } from '../assets/utils/resolveImports.js'; import { AstroError, AstroErrorData, AstroUserError } from '../core/errors/index.js'; import { prependForwardSlash } from '../core/path.js'; -import { escape } from 'html-escaper'; import { type AstroComponentFactory, diff --git a/packages/astro/test/content-layer.test.js b/packages/astro/test/content-layer.test.js index 2ae372137b..268f03dc7b 100644 --- a/packages/astro/test/content-layer.test.js +++ b/packages/astro/test/content-layer.test.js @@ -253,9 +253,9 @@ describe('Content Layer', () => { }); it('escapes alt text in markdown', async () => { - assert.equal($('img[alt^="xss"]').attr('alt'), 'xss ">'); + assert.equal($('img[alt^="xss"]').attr('alt'), 'xss ">'); }); - + it('returns a referenced entry', async () => { assert.ok(json.hasOwnProperty('referencedEntry')); assert.deepEqual(json.referencedEntry, {