diff options
author | Matthias Baumgartner <dev@igsor.net> | 2023-03-04 14:09:17 +0100 |
---|---|---|
committer | Matthias Baumgartner <dev@igsor.net> | 2023-03-04 14:09:17 +0100 |
commit | 7eb2a8074752887afc8845900af2c3c0fb67388e (patch) | |
tree | 5ace51f41dda268fe8b23e67b588d14839ba501e | |
parent | b6f43e68f864f1c15bd56e9775da8edf5c1ac27b (diff) | |
download | tagit-7eb2a8074752887afc8845900af2c3c0fb67388e.tar.gz tagit-7eb2a8074752887afc8845900af2c3c0fb67388e.tar.bz2 tagit-7eb2a8074752887afc8845900af2c3c0fb67388e.zip |
tag uri bugfix
-rw-r--r-- | tagit/actions/tagging.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/tagit/actions/tagging.py b/tagit/actions/tagging.py index 8a20702..611db8e 100644 --- a/tagit/actions/tagging.py +++ b/tagit/actions/tagging.py @@ -9,6 +9,9 @@ from functools import reduce, partial import operator import os +# external imports +import urllib.parse + # kivy imports from kivy.lang import Builder import kivy.properties as kp @@ -67,7 +70,7 @@ class AddTag(Action): # FIXME: replace with proper tag factory for lbl in labels: if lbl not in lut: - tag = self.root.session.storage.node(ns.bsfs.Tag, TAG_PREFIX[lbl]) + tag = self.root.session.storage.node(ns.bsfs.Tag, TAG_PREFIX[urllib.parse.quote(lbl)]) tag.set(ns.bst.label, lbl) tags.add(tag) with self.root.browser as browser, \ @@ -134,7 +137,7 @@ class EditTag(Action): # FIXME: replace with proper tag factory for lbl in added_labels: if lbl not in lut: - tag = self.root.session.storage.node(ns.bsfs.Tag, TAG_PREFIX[lbl]) + tag = self.root.session.storage.node(ns.bsfs.Tag, TAG_PREFIX[urllib.parse.quote(lbl)]) tag.set(ns.bst.label, lbl) added.add(tag) added = reduce(operator.add, added) |