File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -194,7 +194,7 @@ function addInlineCitations(md: string, webSearchSources: SimpleSource[] = []):
194194 if ( index === 0 ) return false ;
195195 const source = webSearchSources [ index - 1 ] ;
196196 if ( source ) {
197- return `<a href="${ source . link } " target="_blank" rel="noreferrer" style="${ linkStyle } ">${ index } </a>` ;
197+ return `<a href="${ escapeHTML ( source . link ) } " target="_blank" rel="noreferrer" style="${ linkStyle } ">${ index } </a>` ;
198198 }
199199 return "" ;
200200 } )
@@ -235,7 +235,7 @@ function createMarkedInstance(sources: SimpleSource[]): Marked {
235235 link : ( href , title , text ) => {
236236 const safeHref = sanitizeHref ( href ) ;
237237 return safeHref
238- ? `<a href="${ safeHref } " target="_blank" rel="noreferrer">${ text } </a>`
238+ ? `<a href="${ escapeHTML ( safeHref ) } " target="_blank" rel="noreferrer">${ text } </a>`
239239 : `<span>${ escapeHTML ( text ?? "" ) } </span>` ;
240240 } ,
241241 html : ( html ) => escapeHTML ( html ) ,
You can’t perform that action at this time.
0 commit comments