mirror of
				https://github.com/zadam/trilium.git
				synced 2025-11-03 20:06:08 +01:00 
			
		
		
		
	Merge remote-tracking branch 'origin/master'
This commit is contained in:
		@@ -10,6 +10,7 @@ import ScreenContainer from "../widgets/mobile_widgets/screen_container.js";
 | 
			
		||||
import ScrollingContainer from "../widgets/containers/scrolling_container.js";
 | 
			
		||||
import ProtectedSessionPasswordDialog from "../widgets/dialogs/protected_session_password.js";
 | 
			
		||||
import ConfirmDialog from "../widgets/dialogs/confirm.js";
 | 
			
		||||
import FilePropertiesWidget from "../widgets/ribbon_widgets/file_properties.js";
 | 
			
		||||
 | 
			
		||||
const MOBILE_CSS = `
 | 
			
		||||
<style>
 | 
			
		||||
@@ -128,7 +129,7 @@ export default class MobileLayout {
 | 
			
		||||
                        .child(
 | 
			
		||||
                            new NoteDetailWidget()
 | 
			
		||||
                                .css('padding', '5px 20px 10px 0')
 | 
			
		||||
                        )
 | 
			
		||||
                        ).child(new FilePropertiesWidget().css('font-size','smaller'))
 | 
			
		||||
                )
 | 
			
		||||
            )
 | 
			
		||||
            .child(new ProtectedSessionPasswordDialog())
 | 
			
		||||
 
 | 
			
		||||
@@ -292,7 +292,12 @@ async function importZip(taskContext, fileBuffer, importRootNote) {
 | 
			
		||||
            content = content.replace(/<\/body>.*<\/html>/gis, "");
 | 
			
		||||
 | 
			
		||||
            content = content.replace(/src="([^"]*)"/g, (match, url) => {
 | 
			
		||||
                url = decodeURIComponent(url);
 | 
			
		||||
                try {
 | 
			
		||||
                    url = decodeURIComponent(url);
 | 
			
		||||
                } catch (e) {
 | 
			
		||||
                    log.error(`Cannot parse image URL '${url}', keeping original (${e}).`);
 | 
			
		||||
                    return `src="${url}"`;
 | 
			
		||||
                }
 | 
			
		||||
 | 
			
		||||
                if (isUrlAbsolute(url) || url.startsWith("/")) {
 | 
			
		||||
                    return match;
 | 
			
		||||
@@ -304,7 +309,12 @@ async function importZip(taskContext, fileBuffer, importRootNote) {
 | 
			
		||||
            });
 | 
			
		||||
 | 
			
		||||
            content = content.replace(/href="([^"]*)"/g, (match, url) => {
 | 
			
		||||
                url = decodeURIComponent(url);
 | 
			
		||||
                try {
 | 
			
		||||
                    url = decodeURIComponent(url);
 | 
			
		||||
                } catch (e) {
 | 
			
		||||
                    log.error(`Cannot parse link URL '${url}', keeping original (${e}).`);
 | 
			
		||||
                    return `href="${url}"`;
 | 
			
		||||
                }
 | 
			
		||||
 | 
			
		||||
                if (isUrlAbsolute(url)) {
 | 
			
		||||
                    return match;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user