mirror of
https://github.com/zadam/trilium.git
synced 2025-11-18 03:00:41 +01:00
better value matching regex
This commit is contained in:
@@ -487,7 +487,7 @@ export default class NoteAttributesWidget extends TabAwareWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
formatValue(val) {
|
formatValue(val) {
|
||||||
if (!/[^\w_-]/.test(val)) {
|
if (/^[\p{L}\p{N}\-_,.]+$/u.test(val)) {
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
else if (!val.includes('"')) {
|
else if (!val.includes('"')) {
|
||||||
|
|||||||
Reference in New Issue
Block a user