GTG

Merge lp:~parthpanchl/gtg/workspace into lp:~gtg/gtg/old-trunk

Proposed by Parth Panchal
Status: Rejected
Rejected by: Izidor Matušov
Proposed branch: lp:~parthpanchl/gtg/workspace
Merge into: lp:~gtg/gtg/old-trunk
Diff against target: 52 lines (+13/-2)
3 files modified
AUTHORS (+2/-1)
CHANGELOG (+1/-0)
GTG/gtk/browser/treeview_factory.py (+10/-1)
To merge this branch: bzr merge lp:~parthpanchl/gtg/workspace
Reviewer Review Type Date Requested Status
Parin Porecha Needs Fixing
Nimit Shah Pending
Review via email: mp+209275@code.launchpad.net

Commit message

Description of the change

Fixes Bug #1261772:
-> Escapes the tagname in the Treeview preserving xml formatting tags by parsing it using regex.
-> XML libraries couldn't be used for parsing because the tagname may contain unescaped characters.

To post a comment you must log in.
lp:~parthpanchl/gtg/workspace updated
1361. By Parth Panchal

Fixes unecessary comments & newlines

1362. By Parth Panchal

Resolves conflicts

Revision history for this message
Parin Porecha (parinporecha) wrote :

Parth >

I reviewed your patch, it solves the bug. Great !
However the Gtk warnings are still there

Gtk-WARNING **: Failed to set text from markup due to error parsing markup: Error on line 1: Entity did not end with a semicolon; most likely you used an ampersand character without intending to start an entity - escape ampersand as &

Please fix them, and I'll merge the patch.

review: Needs Fixing
Revision history for this message
Izidor Matušov (izidor) wrote :

GTG moved the primary code hosting over to Github: https://github.com/getting-things-gnome

If your patch is still relevant and you would like to get it merged, create a pull request on github against branch https://github.com/getting-things-gnome/gtg

Revision history for this message
Parth Panchal (parthpanchl) wrote :

Izidor >
I couldn't find time for this bug, so it just slipped out of my mind. I'll fix it & send the pull request directly to the Github repo.

Unmerged revisions

1362. By Parth Panchal

Resolves conflicts

1361. By Parth Panchal

Fixes unecessary comments & newlines

1360. By Parth Panchal

Updates Changelog & Authors

1359. By Parth Panchal

Fixes Bug #1261772

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'AUTHORS'
2--- AUTHORS 2014-03-01 21:15:24 +0000
3+++ AUTHORS 2014-03-05 18:57:07 +0000
4@@ -132,4 +132,5 @@
5 * Sagar Ghuge <ghugesss@gmail.com>
6 * Sushant Raikar <sushantthecoder@gmail.com>
7 * Atit Anand <atit.anand.cs@gmail.com>
8-* Sara Ribeiro <sara.rmgr@gmail.com>
9+* Parth P. Panchal <parthpanchl@gmail.com>
10+* Sara Ribeiro <sara.rmgr@gmail.com>
11\ No newline at end of file
12
13=== modified file 'CHANGELOG'
14--- CHANGELOG 2014-03-01 21:15:24 +0000
15+++ CHANGELOG 2014-03-05 18:57:07 +0000
16@@ -17,6 +17,7 @@
17 * Fix for bug #644993 : Automatic generation of tag color, by Atit Anand
18 * Fix for bug #1286491 : RTM sync backend fails to load, by Pawan Hegde
19 * Fix for bug #1286493 : GTG cannot connect to RTM, by Pawan Hegde
20+ * Fix for bug #1261772 : Creating a tag with "&" in it causes it to be not displayed in tag sidebar, by Parth Panchal
21 * Fix for bug #1288011 : More intuitive title label for tasks, by Sara Ribeiro
22
23 2013-11-24 Getting Things GNOME! 0.3.1
24
25=== modified file 'GTG/gtk/browser/treeview_factory.py'
26--- GTG/gtk/browser/treeview_factory.py 2014-03-01 21:15:24 +0000
27+++ GTG/gtk/browser/treeview_factory.py 2014-03-05 18:57:07 +0000
28@@ -20,6 +20,7 @@
29 from gi.repository import GObject, Gtk, Pango
30 import xml.sax.saxutils as saxutils
31 import locale
32+import re
33
34 from GTG import _
35 from GTG.core import CoreConfig
36@@ -217,7 +218,15 @@
37 if node.get_attribute("nonworkview") == "True":
38 return "<span color='%s'>%s</span>" % (self.unactive_color, label)
39 else:
40- return label
41+ formatted = re.search(">.+?</", label)
42+ if formatted:
43+ # Get position of the data between formatting tags
44+ start = formatted.start() + 1
45+ end = formatted.end() - 2
46+ # Escapes data
47+ return label[ : start] + saxutils.escape(label[start : end]) + label[end : ]
48+ else:
49+ return saxutils.escape(label)
50
51 def get_tag_count(self, node):
52 if node.get_id() == 'search':

Subscribers

People subscribed via source and target branches

to status/vote changes: