mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-31 10:26:08 +01:00 
			
		
		
		
	html_sanitizer: Demote H1 tags (#2190)
Generalize clipper.js support for removing H1 tags so it also applies to imports. This will move all heading levels down to make room if needed, only leaving duplicates at H6.
This commit is contained in:
		| @@ -104,10 +104,7 @@ function createNote(req) { | ||||
| } | ||||
|  | ||||
| function processContent(images, note, content) { | ||||
|     let rewrittenContent = htmlSanitizer.sanitize(content) | ||||
|         // H1 is not supported so convert it to H2 | ||||
|         .replace(/<h1/ig, "<h2") | ||||
|         .replace(/<\/h1/ig, "</h2"); | ||||
|     let rewrittenContent = htmlSanitizer.sanitize(content); | ||||
|  | ||||
|     if (images) { | ||||
|         for (const {src, dataUrl, imageId} of images) { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user