Edgewall Software
Modify

Opened 2 months ago

Last modified 2 months ago

#13863 new defect

Inconsistent link escaping mechanism

Reported by: Dirk Stöcker Owned by:
Priority: normal Milestone:
Component: wiki system Version: 1.6
Severity: normal Keywords:
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

In Trac a link can be escaped with a !, like in ([42])

![42]

The problem is, that this depends on the content of the brackets. e.g. this wont work (![foo]) and print the ! sign as well.

![foo]

This means the escape mechanism on pages depends on the future changes of the wiki (in this case the status will change as soon as somebody adds a page called foo.

Especially strange as it also depends on potential link status like for (![FooBar]) which cannot only be escaped with another method ([FooBar]).

![FooBar] doesn't work
[!FooBar] works

My suggestion. ![ should always escape the contents. If the ! should be printed a second ! needs to be added !![ (like in ![42]):

!![42]

That way it would be consistent and not depending on possible future changes.

Attachments (0)

Change History (2)

comment:1 by Jun Omae, 2 months ago

[...] is link to a revision in a repository. If the revision part doesn't match with [0-9]+ or [0-9a-f]+, the text is not convert a link.

A user could use the following workarounds:

  • Enclose with `...` or {{{...}}} (e.g. `[42]`[42])
  • [[html()] macro (e.g. [[html([42])]] → [42])

I think that it might be good to add a syntax like `...` without any markups.

in reply to:  1 comment:2 by Dirk Stöcker, 2 months ago

Replying to Jun Omae:

[...] is link to a revision in a repository. If the revision part doesn't match with [0-9]+ or [0-9a-f]+, the text is not convert a link.

Don't focus too much on the example. The effect is true for other working links (but not CamelCase): [/Clients] ![/Clients] vs [Clients] [Clients]

I think that it might be good to add a syntax like `...` without any markups.

That would be another solution.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The ticket will remain with no owner.
The ticket will be disowned.
as The resolution will be set. Next status will be 'closed'.
The owner will be changed from (none) to anonymous. Next status will be 'assigned'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.