Zim

Escape input when translating to Source

Bug #946229 reported by dotancohen
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Zim
Confirmed
Wishlist
Unassigned

Bug Description

Please escape user input when converting to Zim source files to preserve input. This is to resolve the issue of Zim being unable to handle arbitrary input. Additionally, there is an RFE [1] to have an easily-accessible mode to enter Source mode if keyboard shortcuts such as Ctrl-I for Italic or Ctrl-B for Bold are not enough.

Thank you.

[1] https://bugs.launchpad.net/zim/+bug/946224

Revision history for this message
Christoph Zwerschke (cito) wrote :

You should clarify two things:

* Do you really want to escape all user input? That would mean that formatting with wiki syntax will not work any more, i.e. if you enter **bold** this would not be bold any more, and if you enter a bullted list with asterisks, they would not be converted to bullet points any more. This would be a pretty big change that needs some discussion, and the additional RFE you mention would be a prerequisite.

* Technically, I'm not sure if the Zim/Dokuwiki syntax even allows escaping arbitrary markup, except by putting it in double or triple quote. But this also changes the rendering to monospaced which is not always what you want. This needs to be clarified first, maybe the markup syntax needs to be extended to implement this.

Revision history for this message
Christoph Zwerschke (cito) wrote :

The second problem could be solved by switching to MarkDown syntax which already has mechanisms for escaping user input (e.g. autoescaping of & chars or by putting a backslash in front of an asterisk) (see https://bugs.launchpad.net/zim/+bug/495898).

Revision history for this message
Christoph Zwerschke (cito) wrote :

The first problem could be solved by making this a user setting to make everybody happy. E.g. there could be a toggle under the edit menu to enable/disable interpretation of wiki syntax. When enabled, **bold** would be interpreted as bold, when disabled, it would be escaped as \*\*bold\*\* or whatever (this is currently not working, see second problem).

Changed in zim:
importance: Undecided → Wishlist
Revision history for this message
Jaap Karssenberg (jaap.karssenberg) wrote :

Moving to incomplete, as I miss the real problem statement in this bug (if we discussed before please remind me)

Regards,

Jaap

Changed in zim:
status: New → Incomplete
Revision history for this message
dotancohen (dotancohen) wrote :

> Do you really want to escape all user input?

Yes.

> That would mean that formatting with wiki syntax will not work any more, i.e. if you enter **bold** this would
> not be bold any more, and if you enter a bullted list with asterisks, they would not be converted to bullet points
> any more.

That seems to be a limitation of Dokuwiki. This RFE would be solved if arbitrary characters could be escaped in Dokuwiki or if a different wiki syntax which supports escaping arbitrary characters were implemented, with sufficient facility for having Zim automatically escape said characters.

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for Zim because there has been no activity for 60 days.]

Changed in zim:
status: Incomplete → Expired
Revision history for this message
Hans Ginzel (hans-matfyz) wrote :

The escaping could be interesting locally only, when pasting some text that should not be interpreted. See the :set paste option in Vim. http://vimdoc.sourceforge.net/htmldoc/options.html#'paste'

dotancohen (dotancohen)
Changed in zim:
status: Expired → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.