Skip to content

Build your personal knowledge base with Trilium Notes

sanitize label value

J Rao2389ab30f84d
diff --git a/src/routes/api/clipper.js b/src/routes/api/clipper.js
index e1500c2c0b..d792ff38a0 100644
--- a/src/routes/api/clipper.js
+++ b/src/routes/api/clipper.js
@@ -103,8 +103,8 @@ function createNote(req) {
if (labels) {
for (const labelName in labels) {
- console.log('set label ' + labelName + ' on the new note!');
- note.setLabel(labelName, labels[labelName]);
+ const labelValue = htmlSanitizer.sanitize(labels[labelName]);
+ note.setLabel(labelName, labelValue);
}
}