mirror of
				https://github.com/zadam/trilium.git
				synced 2025-11-03 20:06:08 +01:00 
			
		
		
		
	sanitize note title && attrs just to be sure
This commit is contained in:
		@@ -2,6 +2,8 @@ const sanitizeHtml = require('sanitize-html');
 | 
			
		||||
 | 
			
		||||
// intended mainly as protection against XSS via import
 | 
			
		||||
// secondarily it (partly) protects against "CSS takeover"
 | 
			
		||||
// sanitize also note titles, label values etc. - there's so many usage which make it difficult to guarantee all of them
 | 
			
		||||
// are properly handled
 | 
			
		||||
function sanitize(dirtyHtml) {
 | 
			
		||||
    if (!dirtyHtml) {
 | 
			
		||||
        return dirtyHtml;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user