1
0
mirror of https://github.com/misterunknown/ifm.git synced 2025-08-12 19:13:57 +02:00

Replace all # and ?

This commit is contained in:
Dmitriy Novash
2021-06-11 21:36:25 +03:00
parent 31e6d37e64
commit f331f8ed04

View File

@@ -289,7 +289,7 @@ function IFM(params) {
let item = self.fileCache.find( x => x.guid == $(this).attr('id') );
let popover = document.createElement( 'img' );
if( self.config.isDocroot )
popover.src = encodeURI( self.pathCombine( self.currentDir, item.name ) ).replace( '#', '%23' ).replace( '?', '%3F' );
popover.src = encodeURI( self.pathCombine( self.currentDir, item.name ) ).replace( /#/g, '%23' ).replace( /\?/g, '%3F' );
else
popover.src = self.api + "?api=proxy&dir=" + encodeURIComponent( self.currentDir ) + "&filename=" + encodeURIComponent( item.name );
popover.classList.add( 'imgpreview' );