Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have nas:

  • Operating system: Ubuntu Linux 12.04.1
  • Kernel and CPU: Linux 3.2.0-34-generic on x86_64
  • Transmission 2.51 (13280)

On all operating system (browser Chrome) web client Transmission in file names after point of becoming a symbol

"&#8203 ;" (without space)

"The.&#8203 ;Big.&#8203 ;Bang.&#8203 ;Theory.&#8203 ;S06E05.&#8203 ;720p.&#8203 ;WEB-DL‌​.&#8203 ;Rus.&#8203 ;Eng.&#8203 ;mkv 810.7 MB of 810.7 MB (100%)" (without space)

How to remove these characters?

share|improve this question
3  
FYI That is the unicode for ZERO. this character is intended for line break control; it has no width, but its presence between two characters does not prevent increased letter spacing in justification fileformat.info/info/unicode/char/200b/index.htm –  Rinzwind Feb 22 '13 at 19:18
    
But why browser output this in the plain text? Samlpe: The.​Big.​Bang.​Theory.​S06E05.​720p.​WEB-DL‌​.​Rus.​Eng.​mkv 810.7 MB of 810.7 MB (100%) –  wizard Feb 23 '13 at 5:06

2 Answers 2

up vote 3 down vote accepted

Fix /usr/share/transmission/web/javascript/file-row.js:

line 140:

name = name.replace(/([\/_\.])/g, "$1&#8203 ;"); (without space before ";")

replaced

name = name.replace(/([\/_\.])/g, "$1");

Next, clear browser cache.

share|improve this answer
    
Excellent find wizard –  Rinzwind Feb 24 '13 at 11:34

The original line 140 in /usr/share/transmission/web/javascript/file-row.js tries to insert zero width spaces in the file name, so it would break nicely on long filenames.

name = name.replace(/([\/_\.])/g, "$1​");

The problem is that when it is set, HTML escape sequences are not interpreted, but actually made visible for the end user. This can be solved by using javascript escape sequences instead.

Replace line 140 with:

name = name.replace(/([\/_\.])/g, "$1\u200B");

This achieves the original goal.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.