Opened 12 years ago

Closed 10 years ago

#3171 closed Bug (worksforme)

Zero-width spaces near '/'

Reported by: dairinin Owned by: kjg
Priority: Low Milestone: None Set
Component: Web Client Version: 1.92
Severity: Minor Keywords:
Cc: czarkoff@…


Currently, at line 1253 of transmission.js, '/' symbols in comment field are postfixed with something. When comment field contains a link to the torrent's origin, it is not possible to copy-paste it to browser's address field - the url is broken. I've replaced this line with plain assignment, and visually nothing changed. What is the purpose of this "&#8203" symbol?

Attachments (1)

tm.JPG (21.0 KB) - added by dairinin 12 years ago.
Firefox & patch

Download all attachments as: .zip

Change History (11)

comment:1 Changed 12 years ago by charles

The line in question:

setInnerHTML( tab.download_dir, download_dir == na ? download_dir : download_dir.replace(/([\/_\.])/g, "$1​") );

comment:3 Changed 12 years ago by charles

The use of ​ was introduced in

to address ticket #1188 "comments and announce address are cut off"

dairinin: does your patch fix this ticket without rebreaking #1188?

comment:4 Changed 12 years ago by charles

The background on ​ -- ... it appears to be a standard practice. I'm using Firefox 3.7a5 and have confirmed it handles copy/pasting these correctly.

IMO the problem lies in whichever browser version you're using to copy and paste the URLs.

comment:5 Changed 12 years ago by charles

  • Resolution set to worksforme
  • Status changed from new to closed

comment:6 Changed 12 years ago by dairinin

Sorry, guys, maybe I was not clear enough (sorry my english). The problem is not that I can not copy-paste URL with ZWSP, problem is that I can not go to this URL after pasting it in address field. I've tried all browsers I have here: IE8, Opera 10.51 and 10.52, Firefox 3.6.3 - none of them is able to use URLs with ZWSPs in them.

BTW, Charles, wikipedia does not state ZWSPs can be used in URLs, I doubt anything can be used inside URL without breaking it.

About #1188, here is screenshot of Firefox with patch applied. Looks fine for me. IE8 and all Operas look the same way. If the problem exist with any browser, I think we should handle comments carefully and detect URLs. If so, we could even make real links from them instead of plain text, like rutorrent does. Something like this:

urls = comment.match ("(https?://|ftps?://|mailto:)[^ ]+");
for (i=0; i<urls.length; i+=2)
   comment = comment.substr (0, comment.indexOf (urls[i])) + "<a href=\"" + urls[i] + "\">" + u
rls[i] + "</a>" + comment.substr (comment.indexOf (urls[i]) + urls[i].length + 1);
Last edited 12 years ago by dairinin (previous) (diff)

Changed 12 years ago by dairinin

Firefox & patch

comment:7 Changed 10 years ago by czarkoff

  • Cc czarkoff@… added
  • Resolution worksforme deleted
  • Status changed from closed to reopened

I can confirm that on Firefox 10.0.2 and Epiphany 3.2.2 (Linux, both i386 and amd64) URLs manipulation is broken.

comment:8 Changed 10 years ago by livings124

This is a two year old ticket, and you have not stated what version of Transmission you're using. Can you be more specific the issue you're seeing?

comment:9 Changed 10 years ago by czarkoff

transmission 2.13 (11501) on OpenBSD 5.0 (installed from packages).

comment:10 Changed 10 years ago by livings124

  • Resolution set to worksforme
  • Status changed from reopened to closed

This is likely fixed in a newer build. Please open a new ticket if there are issues with a current release.

Note: See TracTickets for help on using tickets.