Project

General

Profile

Actions

Feature #33073

open

Macro argument escaping/quoting mechanism

Added by Martin Cizek over 4 years ago. Updated over 1 year ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Text formatting
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:

Description

Currently there is no way to enter a macro argument including e.g. comma (,), which is always treated as an argument separator - see source:trunk/lib/redmine/wiki_formatting/macros.rb#L41. This effectively prevents using e.g. the thumbnail macro for some images when renaming attachments is not an option. We'll be happy to submit a patch once there is some agreement on how to approach this.

Suggestion:
  • Allow double quotes for argument value delimiting.
  • No quotes = old behavior.
  • Special characters within quotes can be encoded as HTML entities (similarly to name="value" HTML element attributes).

Makes sense?

Rationale:
  • ! turns off Redmine-interpreted text formatting constructs - but probably not suitable within the constructs.
  • Text formatting docs say e.g. double quotes can be used when version name contains spaces
  • Users tend to use double quotes anyway, e.g. {{thumbnail(foo.jpg, title="Foo Bar")}} and they hardly realize that the quotes actually become part of the argument value.
  • When I have a version called My "Version", I can refer to it as version:"My "Version"" within Textile. Does not work with Markdown though.
Actions #1

Updated by Martin von Wittich over 1 year ago

This is a regular issue for me when using {{collapse(some descriptive text). I often want to use commas in the descriptive text, but Redmine will cut off any text after the first comma because it believes it to be an argument separator.

Actions

Also available in: Atom PDF