diff --git a/src/vender/puread/adaptesite.js b/src/vender/puread/adaptesite.js index 0a5af42a..b334df9f 100644 --- a/src/vender/puread/adaptesite.js +++ b/src/vender/puread/adaptesite.js @@ -31,17 +31,15 @@ export default class AdapteSite { * Set url */ SetURL( value ) { - /* const uri = util.getLocation( value ); // Clone util.getURI() source const name = (pathname) => { pathname = pathname != "/" && pathname.endsWith("/") ? pathname = pathname.replace( /\/$/, "" ) : pathname; return pathname.replace( /\/[%@#.~a-zA-Z0-9_-]+$|^\/$/g, "" ); }, - path = name( uri.pathname ); - this.url = `${ uri.protocol }//${ uri.hostname }${ path }/`; - */ - host_href = value; + path = name( uri.pathname ); + this.url = `${ uri.protocol }//${ uri.hostname }${ path }/`; + host_href = value; } /** diff --git a/src/vender/puread/plugin/beautify.js b/src/vender/puread/plugin/beautify.js index 879ca901..11a99988 100644 --- a/src/vender/puread/plugin/beautify.js +++ b/src/vender/puread/plugin/beautify.js @@ -350,7 +350,7 @@ function commbeautify( name, $target ) { newsrc = jianshu ? jianshu : newsrc; newsrc = sina ? sina : newsrc; //newsrc = getImgAbsolutePath( newsrc ); - if ( newsrc && !src.startsWith( 'http' ) && !src.startsWith( 'data' ) ) { + if ( newsrc && !newsrc.startsWith( 'http' ) && !newsrc.startsWith( 'data' ) ) { newsrc = getImgAbsolutePath2( newsrc, location.href ); }