Skip to content

armgit / dashy

Public Imported from GitHub
0

πŸš€ A self-hostable personal dashboard built for you. Includes status-checking, widgets, themes, icon packs, a UI editor and tons more!

🌐 Support for Chinese chars in tag input (#2009)

Alicia Sykesc4c88b85fc5f
diff --git a/src/components/InteractiveEditor/EditItem.vue b/src/components/InteractiveEditor/EditItem.vue
index 2b1fee22..cc05f031 100644
--- a/src/components/InteractiveEditor/EditItem.vue
+++ b/src/components/InteractiveEditor/EditItem.vue
@@ -236,7 +236,7 @@ export default {
if (newItem.hotkey) newItem.hotkey = parseInt(newItem.hotkey, 10);
const strToTags = (tags) => {
const tagArr = (typeof tags === 'string') ? tags.split(',') : tags;
- return tagArr.map((tag) => tag.trim().toLowerCase().replace(/[^a-z0-9]+/, ''));
+ return tagArr.map((tag) => tag.trim().toLowerCase()).filter(Boolean);
};
const strToBool = (str) => {
if (str === undefined) return undefined;