#616 closed defect (fixed)
escape character in the wiki
Reported by: | toni | Owned by: | Remy Blank |
---|---|---|---|
Priority: | normal | Milestone: | 0.12 |
Component: | wiki system | Version: | 0.7.1 |
Severity: | normal | Keywords: | escape link |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
From what I understand there is no escape character in the wiki. This is a problem when you try to write things that are tags. It would be nice if the equvalent of the backslash in unix existed.
That is if there is a backslash next char is interpreted as normal character.
Attachments (0)
Change History (25)
comment:1 by , 20 years ago
Milestone: | → 0.8 |
---|
comment:2 by , 20 years ago
Severity: | normal → major |
---|
comment:3 by , 20 years ago
Keywords: | escape link added |
---|
comment:5 by , 20 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:7 by , 16 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
' as in required my case. |
comment:8 by , 16 years ago
Milestone: | 0.8 → 0.12 |
---|---|
Severity: | major → normal |
Well, right, double pipes are not yet escapable with !, and this can be considered as a bug, I guess.
You can use `||`
in the meantime.
follow-up: 10 comment:9 by , 16 years ago
Is there any way to create a page with square brackets in the title? Unicode and the native symbols are rejected, but I need to make an article with them in.
comment:10 by , 16 years ago
Replying to sheepdean:
Is there any way to create a page with square brackets in the title?
==== [and what's the problem, exactly?] ====
[and what's the problem, exactly?]
it seems to work… if I misunderstood something, please provide a more precise example.
In case you were talking about wiki page names, that should work as well: [wiki:"[head]" the head]
- the head…
What won't work is ]
in the label of a link - maybe that was what you were referring to. In any case, please try to be more precise.
comment:11 by , 15 years ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
Double pipes can now be escaped (fixed in [8679]).
comment:12 by , 15 years ago
Owner: | changed from | to
---|
comment:13 by , 14 years ago
About square brackets…
How should I write this:
Parameter value: "local:[/optional/path/to]"
If I put the exclamation mark before the opening square bracket, trac shows me this escaping symbol:
- Parameter value: "local:![/optional/path/to]"
follow-up: 15 comment:14 by , 14 years ago
![/optional/path/to]
gives [/optional/path/to], which is OK, but in your example, the local: prefix is making things more complex… while the exact reason this fails can certainly be traced to the details of the regexps (shref), let's just say that anyway at this level we're dealing with heuristics. 99% of the time it just works the expected way, for the 1% left (or for another set of 1% if we'd fix this special case), one has to find workarounds…
Here the trick is to dissociate the link prefix local:
from the follow-up, by using an empty markup span, for example local:``![/optional/path/to]
, which then renders as local:[/optional/path/to].
comment:15 by , 14 years ago
Replying to cboos:
Here the trick is to dissociate the link prefix
local:
from the follow-up, by using an empty markup span, for examplelocal:``![/optional/path/to]
, which then renders as local:[/optional/path/to].
Thanks a lot! You've made my day!
Maxim P. Dementiev
Moscow, Russia
comment:16 by , 14 years ago
More issues with square brackets:
- I want to create the following trac links at the top of my pages, using square brackets: "[Previous] [Next] [Top]"
I haven't managed to find a way to do that using [http://some.link [Previous]] [http://some.other.link [Next]] as the closing square bracket is no longer part of the link: [Previous] [Next]
- Similar issue when wanting to put a subject in square brackets on a mailto: [mailto://some@mailing.list?subject=![SUBJECT] report an issue] becomes: mailto://some@… report an issue]
comment:17 by , 14 years ago
Starting with 0.12, you can use the WikiCreole link syntax, but you will need to add a space between the closing ]
and the end of the link if your label ends with ]
, like so:
[[http://some.link/|[Previous] ]]
→ [Previous][[mailto://some@mailing.list?subject=[SUBJECT]|report an issue]]
→ report an issue
comment:18 by , 14 years ago
Yes, and for "prettifying" the wiki source, you can even add some more space:
[[http://some.link/ | [Previous] ]] [[mailto://some@mailing.list?subject=[SUBJECT] |report an issue]]
Whitespace is stripped, except not after the initial "[[
".
I was also wondering about the possible nesting of [[..]]
pairs. One use case would be to put such a WikiCreole link inside a macro call, or even nest macro calls…
[[span(style=background:#eee,[[http://some.link/ | [Previous] ]] )]]
But this is a bit more tricky…
comment:19 by , 14 years ago
Any chance on how to make this work? It is a regular expression that I want to include on a wiki page.
\[1-999\] error\x\(s\x\)
The two "x's" are only there so the line displays pseudo-correctly. Remove the x's and that is what I am trying to display.
Thanks,
Trent
comment:21 by , 12 years ago
What about other characters, like *? How do I get a literal asterisk into a page?
You can escape a WikiLink by preceding it with a single '!'.
Example:
Results in:
However, this doesn't work for all hyperlinks.
Possibly, it should also work to escape anything:
Results: