#2455 closed defect (fixed)
Ampersand following a short link
Reported by: | moschny at ipd.uni-karlsruhe.de | Owned by: | Christian Boos |
---|---|---|---|
Priority: | normal | Milestone: | 0.10 |
Component: | wiki system | Version: | 0.9.2 |
Severity: | minor | Keywords: | review |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
An ampersand put directly after a short reference is rendered incorrectly and creates a broken link.
Example: "ticket:1153&
" is rendered as ticket:1153& ("ticket:1153&;
" for trac 0.9.2) and the generated link ends in "...1153&
".
If the ampersand is followed by whitespace, it should not be treated as part of the link target.
This is a left-over from ticket:1153.
Attachments (2)
Change History (8)
by , 19 years ago
Attachment: | dont_escape_wiki_text_beforehand-r2636.patch added |
---|
comment:1 by , 19 years ago
Keywords: | review added |
---|---|
Owner: | changed from | to
Status: | new → assigned |
Updated the patch on #1153 against the current trunk.
Please review.
by , 19 years ago
Attachment: | dont_escape_wiki_text_beforehand-r2636.2.patch added |
---|
More escaping in formatter.py/_make_ext_link().
comment:2 by , 19 years ago
In trac/wiki/formatter.py/_make_ext_link(), url, text and title should be esacped, I think. Here's an updated patch.
BTW: How do I run the tests?
comment:3 by , 19 years ago
Ok. For the tests, I use:
PYTHONPATH=".;$PYTHONPATH" python trac/test.py
on Windows; similar stuff on Unix, simply replace ";" by ":".
comment:5 by , 19 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Slightly modified attachment:dont_escape_wiki_text_beforehand-r2636.2.patch applied in r2644.
comment:6 by , 19 years ago
Milestone: | 1.0 → 0.10 |
---|
Don't HTML escape the wiki text before parsing. The HTML escaping is instead done as a normal formatting step.