@@ -253,7 +253,7 @@ function domDependencyInjector(
253253 afterBody ?: boolean ,
254254 ) => {
255255 const scriptEl = doc . createElement ( "script" ) ;
256- scriptEl . setAttribute ( "src" , href ) ;
256+ scriptEl . setAttribute ( "src" , pathWithForwardSlashes ( href ) ) ;
257257 injectEl ( scriptEl , attribs , afterBody ) ;
258258 } ;
259259
@@ -263,7 +263,7 @@ function domDependencyInjector(
263263 afterBody ?: boolean ,
264264 ) => {
265265 const linkEl = doc . createElement ( "link" ) ;
266- linkEl . setAttribute ( "href" , href ) ;
266+ linkEl . setAttribute ( "href" , pathWithForwardSlashes ( href ) ) ;
267267 linkEl . setAttribute ( "rel" , "stylesheet" ) ;
268268 injectEl ( linkEl , attribs , afterBody ) ;
269269 } ;
@@ -274,7 +274,7 @@ function domDependencyInjector(
274274 type ?: string ,
275275 ) => {
276276 const linkEl = doc . createElement ( "link" ) ;
277- linkEl . setAttribute ( "href" , href ) ;
277+ linkEl . setAttribute ( "href" , pathWithForwardSlashes ( href ) ) ;
278278 linkEl . setAttribute ( "rel" , rel ) ;
279279 if ( type ) {
280280 linkEl . setAttribute ( "type" , type ) ;
@@ -378,7 +378,9 @@ function lineDependencyInjector(
378378 if ( ! type ) {
379379 type = "" ;
380380 }
381- lines . push ( rawLinkTemplate ( { href, type, rel } ) ) ;
381+ lines . push (
382+ rawLinkTemplate ( { href : pathWithForwardSlashes ( href ) , type, rel } ) ,
383+ ) ;
382384 } ;
383385
384386 const injectHtml = ( html : string ) => {
0 commit comments