File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ import type { RssItem } from '$lib/types';
33import type { NoteMeta } from '@maiertech/sveltekit-helpers' ;
44import { json } from '@sveltejs/kit' ;
55import type { RequestHandler } from './$types' ;
6+ import { escapeXml } from '$lib/utils/escapeXml' ;
67
78export const prerender = true ;
89
@@ -19,7 +20,7 @@ export const GET: RequestHandler = async ({ fetch }) => {
1920 category : 'Note' ,
2021 enclosure : note . ogImageUrl
2122 ? {
22- url : note . ogImageUrl ,
23+ url : escapeXml ( note . ogImageUrl ) ,
2324 type : 'image/png' ,
2425 length : 0 // We don't know the size of the image.
2526 }
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ import type { RssItem } from '$lib/types';
33import type { ResolvedPost } from '@maiertech/sveltekit-helpers' ;
44import { json } from '@sveltejs/kit' ;
55import type { RequestHandler } from './$types' ;
6+ import { escapeXml } from '$lib/utils/escapeXml' ;
67
78export const prerender = true ;
89
@@ -19,7 +20,7 @@ export const GET: RequestHandler = async ({ fetch }) => {
1920 category : 'Post' ,
2021 enclosure : post . ogImageUrl
2122 ? {
22- url : post . ogImageUrl ,
23+ url : escapeXml ( post . ogImageUrl ) ,
2324 type : 'image/png' ,
2425 length : 0 // We don't know the size of the image.
2526 }
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ export const GET: RequestHandler = async ({ fetch }) => {
2626 <description>${ item . description } </description>
2727 <link>${ item . link } </link>
2828 <pubDate>${ item . pubDate } </pubDate>
29- ${ item . enclosure ? `<![CDATA[< enclosure url="${ item . enclosure . url } " length="${ item . enclosure . length } " type="${ item . enclosure . type } " />]] >` : '' }
29+ ${ item . enclosure ? `<enclosure url="${ item . enclosure . url } " length="${ item . enclosure . length } " type="${ item . enclosure . type } "></enclosure >` : '' }
3030 <guid>${ item . link } </guid>
3131 </item>
3232 `
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ export const GET: RequestHandler = async ({ fetch }) => {
2626 <description>${ item . description } </description>
2727 <link>${ item . link } </link>
2828 <pubDate>${ item . pubDate } </pubDate>
29- ${ item . enclosure ? `<![CDATA[< enclosure url="${ item . enclosure . url } " length="${ item . enclosure . length } " type="${ item . enclosure . type } " />]] >` : '' }
29+ ${ item . enclosure ? `<enclosure url="${ item . enclosure . url } " length="${ item . enclosure . length } " type="${ item . enclosure . type } "></enclosure >` : '' }
3030 <guid>${ item . link } </guid>
3131 </item>
3232 `
You can’t perform that action at this time.
0 commit comments