This is a migrated thread and some comments may be shown as answers.

The ' symbol cause problems

0 Answers 79 Views
Upload
This is a migrated thread and some comments may be shown as answers.
Tomas
Top achievements
Rank 1
Tomas asked on 26 Jul 2012, 12:40 PM
There is problem with your MVC Upload(MVC Kendo Upload too). If you add file name with symbol Jon's.txt to Upload control the Upload file list will look like

<span class="t-filename" title="Jon" s.txt'="">Jon's.txt</span>

As you see the html is parsed incorrectly. Also we keep Upload file list hidden by default and manage our own file list. We use JS code below to delete file from Upload file list.

    function RemoveFile(fileName) {
        $('.t-filename[title="' + fileName + '"]').last().parent().remove();    
    }

And this code do not work on such file. Do you have any solution?

BTW it is not very smart to use file name as ID, why not to use GUID ID for files? 

No answers yet. Maybe you can help?

Tags
Upload
Asked by
Tomas
Top achievements
Rank 1
Share this question
or