mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-31 10:26:08 +01:00 
			
		
		
		
	fixes
This commit is contained in:
		| @@ -1,6 +1,7 @@ | |||||||
| import ScriptContext from "./script_context.js"; | import ScriptContext from "./script_context.js"; | ||||||
| import server from "./server.js"; | import server from "./server.js"; | ||||||
| import toastService from "./toast.js"; | import toastService from "./toast.js"; | ||||||
|  | import treeCache from "./tree_cache.js"; | ||||||
|  |  | ||||||
| async function getAndExecuteBundle(noteId, originEntity = null) { | async function getAndExecuteBundle(noteId, originEntity = null) { | ||||||
|     const bundle = await server.get('script/bundle/' + noteId); |     const bundle = await server.get('script/bundle/' + noteId); | ||||||
| @@ -17,7 +18,9 @@ async function executeBundle(bundle, originEntity, $container) { | |||||||
|         }.call(apiContext)); |         }.call(apiContext)); | ||||||
|     } |     } | ||||||
|     catch (e) { |     catch (e) { | ||||||
|         toastService.showAndLogError(`Execution of ${bundle.noteId} failed with error: ${e.message}`); |         const note = await treeCache.getNote(bundle.noteId); | ||||||
|  |  | ||||||
|  |         toastService.showAndLogError(`Execution of JS note "${note.title}" with ID ${bundle.noteId} failed with error: ${e.message}`); | ||||||
|     } |     } | ||||||
| } | } | ||||||
|  |  | ||||||
|   | |||||||
| @@ -26,7 +26,7 @@ class NoteContentUnprotectedFulltextExp extends Expression { | |||||||
|                 FROM notes JOIN note_contents USING (noteId)  |                 FROM notes JOIN note_contents USING (noteId)  | ||||||
|                 WHERE type IN ('text', 'code') AND isDeleted = 0 AND isProtected = 0`)) { |                 WHERE type IN ('text', 'code') AND isDeleted = 0 AND isProtected = 0`)) { | ||||||
|  |  | ||||||
|             content = content.toLowerCase(); |             content = content.toString().toLowerCase(); | ||||||
|  |  | ||||||
|             if (type === 'text' && mime === 'text/html') { |             if (type === 'text' && mime === 'text/html') { | ||||||
|                 content = striptags(content); |                 content = striptags(content); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user