Issue Details (XML | Word | Printable)

Key: JRA-13188
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Chris Mountford [Atlassian]
Reporter: Brad Baker [Atlassian - JIRA BugMaster]
Votes: 1
Watchers: 2
Operations

Add/Edit UI Mockup to this issue
If you were logged in you would be able to see more operations.
JIRA

Trailing + characters are truncuated from URLS in the Description / Environment / Comment fields.

Created: 27/Jul/07 01:06 AM   Updated: 29/Oct/07 09:40 PM
Component/s: Issue Links
Affects Version/s: 3.8.1, 3.10
Fix Version/s: 3.12

Time Tracking:
Original Estimate: 6h
Original Estimate - 6h
Remaining Estimate: 6h
Remaining Estimate - 6h
Time Spent: Not Specified
Remaining Estimate - 6h

Participants: Anton Mazkovoi [Atlassian], Brad Baker [Atlassian - JIRA BugMaster], Chris Mountford [Atlassian], Dushan Hanuska [Atlassian], Ian Daniel [Atlassian] and Scott Farquhar [Atlassian]
Since last comment: 1 year, 35 weeks, 3 days ago
Resolution Date: 29/Oct/07 09:40 PM
To be done by: Single developer
Labels:


 Description  « Hide
If you put a URL like http://www.example.com/xyz- into a description file or comment then the traling - is truncated from the URL link. The actual displayed part is correct however the href part is truncated.

We should encode the URL link not truncate the invalid URL characters. In fact - is not an invalid URL char anyway so I am not sure exactly whats going on here.

I confirmed it happens on 3.8 and 3.10.

This is described in the support request https://support.atlassian.com/browse/JSP-14253



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Ian Daniel [Atlassian] added a comment - 27/Jul/07 01:29 AM - edited
Actually the minus is after the end of the URL in both the display and in the URL itself.

That is, the HTML source produced is:

<a href="http://www.example.com/xyz">http://www.example.com/xyz</a>-

This behaviour is only happening in the Text Renderer, not in the Wiki Renderer. The Wiki Renderer correctly includes the minus in the display and in the URL itself.


Anton Mazkovoi [Atlassian] added a comment - 29/Jul/07 11:12 PM
Need to be very careful when fixing this as there have been a lot of problems including/exclusing characters from a URL.

Scott Farquhar [Atlassian] added a comment - 04/Sep/07 02:58 AM
I'm fine with changing oscore to fix this.

From investigation - it looks like this hasn't been changed since Hani added it in 2003:

1.1 (hani 11-Jul-03): //If the last chars of urlStr is a '.', ':', '-', '/' or '~' then we exclude those chars.
1.1 (hani 11-Jul-03): //The '.' at the end could be just a fullstop to a sentence and we don't want
1.1 (hani 11-Jul-03): //that to be part of an url (which would then be invalid).
1.1 (hani 11-Jul-03): //Pretty much the same for the other symbols - we don't want them at the end of any url
1.1 (hani 11-Jul-03): //cos' this would stuff the url up.

I can't see any test in TextUtilsTest.java that specifically tests this.

If you can raise an issue in OSCORE, I'll fix it, and release a new version:

http://jira.opensymphony.com/secure/IssueNavigator.jspa?component=10008&sorter/field=priority&mode=hide&reset=true&pid=10002&sorter/order=ASC

Just assign it to me.

Cheers,
Scott


Dushan Hanuska [Atlassian] added a comment - 15/Oct/07 02:05 AM
Created new bug at http://jira.opensymphony.com/browse/CORE-76. I had to leave it unassigned as I do not have permission to assign issues there.

Scott Farquhar [Atlassian] added a comment - 16/Oct/07 02:46 AM
Mate,

Thought that I'd have time for this, but as usual I bit off more than I can chew.

If you create a patch, and attach it to the issue (also create a unit test that verifies the required functionality), I'll commit it to oscore.

Cheers,
Scott


Chris Mountford [Atlassian] added a comment - 18/Oct/07 07:54 PM
Patch has been prepared. Waiting to see if we can get OSCore revved so we can depend on an official release.

Scott Farquhar [Atlassian] added a comment - 29/Oct/07 04:44 PM
OSCore 2.2.6 has been released:

https://oscore.dev.java.net/servlets/ProjectDocumentList?folderID=8248

Not sure if it is in a maven repo yet.


Scott Farquhar [Atlassian] added a comment - 29/Oct/07 04:56 PM
In this maven repo:

http://maven.opensymphony.com/opensymphony/jars/oscore-2.2.6.jar

We may want to copy to Atlassian's maven repo.


Chris Mountford [Atlassian] added a comment - 29/Oct/07 09:40 PM
updated dep to oscore 2.2.6 and put it in repository.atlassian.com