{TICKET_URI} does not work when filename contains "special" characters

There is an issue playing mediafiles that have special characters in the filename ( ',",#, etc. ). If you directly use this uri in the object code there might be issues when a special character is present because this is not escaped and this breaks the uri or the javascript, depending on the character.

These changes make sure that the filename is urlencoded when in an url.