Edgewall Software
Modify

Opened 19 years ago

Closed 19 years ago

Last modified 19 years ago

#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&amp".

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)

dont_escape_wiki_text_beforehand-r2636.patch (7.7 KB ) - added by Christian Boos 19 years ago.
Don't HTML escape the wiki text before parsing. The HTML escaping is instead done as a normal formatting step.
dont_escape_wiki_text_beforehand-r2636.2.patch (7.5 KB ) - added by moschny at ipd.uni-karlsruhe.de 19 years ago.
More escaping in formatter.py/_make_ext_link().

Download all attachments as: .zip

Change History (8)

by Christian Boos, 19 years ago

Don't HTML escape the wiki text before parsing. The HTML escaping is instead done as a normal formatting step.

comment:1 by Christian Boos, 19 years ago

Keywords: review added
Owner: changed from Jonas Borgström to Christian Boos
Status: newassigned

Updated the patch on #1153 against the current trunk.

Please review.

by moschny at ipd.uni-karlsruhe.de, 19 years ago

More escaping in formatter.py/_make_ext_link().

comment:2 by moschny at ipd.uni-karlsruhe.de, 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 Christian Boos, 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:4 by moschny at ipd.uni-karlsruhe.de, 19 years ago

Ok, thanks. The patched version passes all 416 tests.

comment:5 by Christian Boos, 19 years ago

Resolution: fixed
Status: assignedclosed

comment:6 by Christopher Lenz, 19 years ago

Milestone: 1.00.10

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Christian Boos.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Christian Boos to the specified user.

Add Comment


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