changeset 2891:3481dfe07098

fix #413 Traceback after clicking Save button on User Settings: Subscriptions tab
author RogerHaase <haaserd@gmail.com>
date Thu, 05 Feb 2015 12:26:10 -0700
parents 1a930b0f4ec5
children 07de763fa0dc
files MoinMoin/forms.py
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/forms.py	Mon Feb 02 12:31:55 2015 -0700
+++ b/MoinMoin/forms.py	Thu Feb 05 12:26:10 2015 -0700
@@ -241,7 +241,8 @@
         subscriptions = []
         for child in self:
             if child.u.startswith(ITEMID):
-                value = re.sub(r"\(.*\)", "", child.u)
+                # itemid:67155f195938426d82502540493e8acf (creole)
+                value = child.u.split(" ", 1)[0]
                 item = flaskg.storage.document(**{ITEMID: value.split(":")[1]})
                 try:
                     name_ = item.meta['name'][0]
@@ -249,6 +250,7 @@
                     name_ = "This item doesn't exist"
                 value = u"{0} ({1})".format(value, name_)
             else:
+                # name::ExampleItem | tags::demo | nameprefix::jp | namere::.* | name:MyNamespace:ExampleItem
                 value = child.u
             subscriptions.append(value)
         return self.separator.join(subscriptions)