File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change 1
1
import type { MarkdownHeading } from '@astrojs/markdown-remark' ;
2
+ import { escape } from 'html-escaper' ;
2
3
import { Traverse } from 'neotraverse/modern' ;
3
4
import pLimit from 'p-limit' ;
4
5
import { ZodIssueCode , z } from 'zod' ;
5
6
import type { GetImageResult , ImageMetadata } from '../assets/types.js' ;
6
7
import { imageSrcToImportId } from '../assets/utils/resolveImports.js' ;
7
8
import { AstroError , AstroErrorData , AstroUserError } from '../core/errors/index.js' ;
8
9
import { prependForwardSlash } from '../core/path.js' ;
9
- import { escape } from 'html-escaper' ;
10
10
11
11
import {
12
12
type AstroComponentFactory ,
Original file line number Diff line number Diff line change @@ -253,9 +253,9 @@ describe('Content Layer', () => {
253
253
} ) ;
254
254
255
255
it ( 'escapes alt text in markdown' , async ( ) => {
256
- assert . equal ( $ ( 'img[alt^="xss"]' ) . attr ( 'alt' ) , 'xss "><script>alert(1)</script>' ) ;
256
+ assert . equal ( $ ( 'img[alt^="xss"]' ) . attr ( 'alt' ) , 'xss "><script>alert(1)</script>' ) ;
257
257
} ) ;
258
-
258
+
259
259
it ( 'returns a referenced entry' , async ( ) => {
260
260
assert . ok ( json . hasOwnProperty ( 'referencedEntry' ) ) ;
261
261
assert . deepEqual ( json . referencedEntry , {
You can’t perform that action at this time.
0 commit comments