Modify

Opened 6 years ago

Closed 4 years ago

#4918 closed defect (fixed)

[Patch] problem with cyrillic (or other unicode symbols in question)

Reported by: anonymous Owned by: rjollos
Priority: normal Component: PollMacro
Severity: normal Keywords:
Cc: Trac Release: 0.11

Description

I'm install this plugin on my trac, but I have problem with cyrillic only symbols questions, I can't add more then one poll with error on next poll "Stored poll is not the same as this one.", all polls was saved in one file, named ".poll"

this patch fix the problem


Index: pollmacro/0.11/tracpoll/tracpoll.py
===================================================================
--- pollmacro/0.11/tracpoll/tracpoll.py (revision 5516)
+++ pollmacro/0.11/tracpoll/tracpoll.py (working copy)
@@ -15,7 +15,7 @@
         self.vote_defs = vote_defs
         self.title = title
         # Perhaps the Wiki page name should be included?
-        self.key = ''.join(re.findall(r'(\w+)', title)).lower()
+        self.key = ''.join(re.findall(r'(\w+)', title ,re.UNICODE)).lower()
         self.store = os.path.join(base_dir, self.key + '.poll')
         self.load()

please incude this in your project. Thank you.

Attachments (0)

Change History (4)

comment:1 Changed 5 years ago by anonymous

thanx! great patch!

comment:2 Changed 5 years ago by rjollos

  • Summary changed from problems with cyrillic (or other unicode symbols in question) to [Patch] problem with cyrillic (or other unicode symbols in question)

comment:3 Changed 4 years ago by rjollos

  • Owner changed from athomas to rjollos

Reassigning ticket to new maintainer.

comment:4 Changed 4 years ago by rjollos

  • Resolution set to fixed
  • Status changed from new to closed

(In [8466]) - Added new maintainer to setup.py.

  • Removed requirement for TICKET_VIEW permissions in order to view the poll. Fixes #1632.
  • Fixed unicode issue that was preventing more than one poll in some instances. Fixes #4918.

Add Comment

Modify Ticket

Action
as closed The owner will remain rjollos.
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.