Misformatted link [[||]] corrupts pages
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Zim |
Fix Released
|
High
|
Unassigned |
Bug Description
How to reproduce:
Type [[||]] or [[Hello||World]] into a ZIM page.
Preferably one you don't mind deleting.
A sequence [[||]] causes a ZIM page to raise an exception whenever it is opened. Once a file contains this corrupt markup, the exception will be raised whenever I try to access the corresponding page. Only editing the wiki source can rescue a page.
The same applies to any other link containing two || in source.
If the link target or text contain single | pipe | characters, it will only confuse ZIM causing the part before the first pipe to be taken as the target, the second as the text and the third or later ignored for good meassure.
The problem seems to be that a sequence [[Text1||Text2]] is interpreted as a link with target Text1 but empty visual representation.
For me this problem occurred when experimenting with my makeshift table plugin, but similiar sequences may occur when naivly pasting text into ZIM.
The traceback information:
This is zim 0.60
Python version is sys.version_
Gtk version is (2, 24, 10)
Pygtk version is (2, 24, 0)
Platform is nt
Zim revision is:
branch: pyzim-trunk
revision: 672 <email address hidden>
date: 2013-04-30 19:27:20 +0200
======= Traceback =======
File "E:\devel\
self.
File "E:\devel\
buffer.
File "E:\devel\
self.
File "E:\devel\
self.
File "E:\devel\
self.
File "E:\devel\
self.
File "E:\devel\
self.
TypeError: GtkTextBuffer.
Changed in zim: | |
importance: | Undecided → High |
status: | New → Confirmed |
Changed in zim: | |
status: | Confirmed → Fix Committed |
Fix committed in rev709 of branch pyzim-refactor