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 @@ -264,11 +264,11 @@ export default (ins: Feed) => {
264
264
*/
265
265
const formatEnclosure = ( enclosure : string | Enclosure , mimeCategory = "image" ) => {
266
266
if ( typeof enclosure === "string" ) {
267
- const type = new URL ( enclosure ) . pathname . split ( "." ) . slice ( - 1 ) [ 0 ] ;
267
+ const type = new URL ( sanitize ( enclosure ) ) . pathname . split ( "." ) . slice ( - 1 ) [ 0 ] ;
268
268
return { _attributes : { url : enclosure , length : 0 , type : `${ mimeCategory } /${ type } ` } } ;
269
269
}
270
270
271
- const type = new URL ( enclosure . url ) . pathname . split ( "." ) . slice ( - 1 ) [ 0 ] ;
271
+ const type = new URL ( sanitize ( enclosure . url ) ) . pathname . split ( "." ) . slice ( - 1 ) [ 0 ] ;
272
272
return { _attributes : { length : 0 , type : `${ mimeCategory } /${ type } ` , ...enclosure } } ;
273
273
} ;
274
274
You can’t perform that action at this time.
0 commit comments