Opened 12 years ago

Closed 11 years ago

#531 closed defect (worksforme)

Special character encoding error in Linker/IE

Reported by: ray Owned by: gogo
Priority: normal Milestone: Version 1.0
Component: Plugin_Linker Version: trunk
Severity: normal Keywords: special character encoding


In IE in the linker plugin when you select a link from the tree which contains special characters like umlauts they appear as UTF-8 (i.e. 'tückisch' becomes 'tückisch'), and that screws the link up.

I think the problem is the same as in #167, I could solve it by changing line 401 from

'javascript:document.getElementsByName(\'' + + '\')[0].value=decodeURIComponent(\'' + encodeURIComponent(files[i]) + '\');document.getElementsByName(\'' + + '\')[0].click();document.getElementsByName(\'' + + '\')[0].focus();void(0);', 


'javascript:document.getElementsByName(\'' + + '\')[0].value=unescape(\'' + escape(files[i]) + '\');document.getElementsByName(\'' + + '\')[0].click();document.getElementsByName(\'' + + '\')[0].focus();void(0);', 

and line 421 from

 if(files[i].url) var link = 'javascript:document.getElementsByName(\'' + + '\')[0].value=decodeURIComponent(\'' + encodeURIComponent(files[i].url) + '\');document.getElementsByName(\'' + + '\')[0].click();document.getElementsByName(\'' + + '\')[0].focus();void(0);';


if(files[i].url) var link = 'javascript:document.getElementsByName(\'' + + '\')[0].value=unescape(\'' + escape(files[i].url) + '\');document.getElementsByName(\'' + + '\')[0].click();document.getElementsByName(\'' + + '\')[0].focus();void(0);'; 

that is using escape() instead of encodeURIComponent()

Change History (5)

comment:1 Changed 12 years ago by ray

  • Keywords special character encoding added
  • Milestone set to Version 1.0
  • Version set to trunk

comment:2 Changed 12 years ago by niko

shouldn't this be solved by using valid URLs (that don't contain üs for example?)

comment:3 Changed 12 years ago by niko

...the thing in #167 is the other way around, there xinha replaced %D7%A9 in a link with ש - which is wrong.

but in your case you have allready the ü in the link - which makes a invalid link out of it.

comment:4 Changed 12 years ago by ray

no, the link should not contain an ü, but the file to be linked could. i mentioned #167 here because gogo describes in the resolution (changeset:261 / line 4702) the unwanted behaviour of encodeURIComponent() where,as he concludes, escape() works better. this is just the case here

comment:5 Changed 11 years ago by ray

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

This seems to be working now

Note: See TracTickets for help on using tickets.