mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-31 02:16:05 +01:00 
			
		
		
		
	Merge branch 'master' into dev
# Conflicts: # package-lock.json # package.json
This commit is contained in:
		| @@ -14,8 +14,8 @@ const BAttribute = require('../../becca/entities/battribute'); | ||||
| const htmlSanitizer = require('../../services/html_sanitizer'); | ||||
| const {formatAttrForSearch} = require("../../services/attribute_formatter"); | ||||
|  | ||||
| function findClippingNote(todayNote, pageUrl) { | ||||
|     const notes = todayNote.searchNotesInSubtree( | ||||
| function findClippingNote(clipperInboxNote, pageUrl) { | ||||
|     const notes = clipperInboxNote.searchNotesInSubtree( | ||||
|         formatAttrForSearch({ | ||||
|             type: 'label', | ||||
|             name: "pageUrl", | ||||
| @@ -47,6 +47,7 @@ function addClipping(req) { | ||||
|  | ||||
|     const clipperInbox = getClipperInboxNote(); | ||||
|  | ||||
|     pageUrl = htmlSanitizer.sanitizeUrl(pageUrl); | ||||
|     let clippingNote = findClippingNote(clipperInbox, pageUrl); | ||||
|  | ||||
|     if (!clippingNote) { | ||||
| @@ -57,8 +58,6 @@ function addClipping(req) { | ||||
|             type: 'text' | ||||
|         }).note; | ||||
|  | ||||
|         pageUrl = htmlSanitizer.sanitize(pageUrl); | ||||
|  | ||||
|         clippingNote.setLabel('clipType', 'clippings'); | ||||
|         clippingNote.setLabel('pageUrl', pageUrl); | ||||
|         clippingNote.setLabel('iconClass', 'bx bx-globe'); | ||||
| @@ -96,7 +95,7 @@ function createNote(req) { | ||||
|     note.setLabel('clipType', clipType); | ||||
|  | ||||
|     if (pageUrl) { | ||||
|         pageUrl = htmlSanitizer.sanitize(pageUrl); | ||||
|         pageUrl = htmlSanitizer.sanitizeUrl(pageUrl); | ||||
|  | ||||
|         note.setLabel('pageUrl', pageUrl); | ||||
|         note.setLabel('iconClass', 'bx bx-globe'); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user