forked from CIT/Vmeda.Online
		
	Merge pull request #2743 from dpalou/MOBILE-3320
MOBILE-3320 core: Fix localhost images in browser
This commit is contained in:
		
						commit
						a8fd822c36
					
				@ -29,6 +29,7 @@ import { Platform } from '@singletons';
 | 
			
		||||
 | 
			
		||||
import { mock, mockSingleton, RenderConfig, renderWrapperComponent } from '@/testing/utils';
 | 
			
		||||
import { CoreFilter } from '@features/filter/services/filter';
 | 
			
		||||
import { CoreApp } from '@services/app';
 | 
			
		||||
 | 
			
		||||
describe('CoreFormatTextDirective', () => {
 | 
			
		||||
 | 
			
		||||
@ -87,6 +88,7 @@ describe('CoreFormatTextDirective', () => {
 | 
			
		||||
            getCurrentSite: () => Promise.resolve(site),
 | 
			
		||||
        });
 | 
			
		||||
        mockSingleton(CoreFilter, { formatText: (text) => Promise.resolve(text) });
 | 
			
		||||
        mockSingleton(CoreApp, { isMobile: () => false });
 | 
			
		||||
 | 
			
		||||
        // Act
 | 
			
		||||
        const fixture = await renderWrapperComponent(
 | 
			
		||||
 | 
			
		||||
@ -19,6 +19,7 @@ import { CoreTextUtils } from '@services/utils/text';
 | 
			
		||||
import { CoreConstants } from '@/core/constants';
 | 
			
		||||
import { makeSingleton } from '@singletons';
 | 
			
		||||
import { CoreUrl } from '@singletons/url';
 | 
			
		||||
import { CoreApp } from '@services/app';
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * "Utils" service with helper functions for URLs.
 | 
			
		||||
@ -443,7 +444,7 @@ export class CoreUrlUtilsProvider {
 | 
			
		||||
                scheme == 'file' ||
 | 
			
		||||
                scheme == 'filesystem' ||
 | 
			
		||||
                scheme == CoreConstants.CONFIG.ioswebviewscheme ||
 | 
			
		||||
                (scheme === 'http' && domain === 'localhost');
 | 
			
		||||
                (CoreApp.isMobile() && scheme === 'http' && domain === 'localhost'); // @todo: Get served domain from ENV.
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user