Completed
Last Updated: 30 Nov 2017 16:28 by ADMIN
ADMIN
Hristo Valyavicharski
Created on: 15 Dec 2015 16:26
Category: AsyncUpload
Type: Bug Report
2
RadAsyncUpload allows to execute javascript when file with invalid symbols in the name is selected on MAC.
Workaround: 

function encodeRowContent() {
    var asyncUpload = $find('<%= RadAsync_FileUpload.ClientID%>');
    var $ = $telerik.$;
    asyncUpload._updateRowContent = function (row, inputValue) {
        var $progress,
            $content = $("<span class='ruUploadProgress'>" + $telerik.htmlEncode(this._getFileName(inputValue)) + "</span>");

        $(row).removeClass("ruSelectWrap")
                .addClass("ruFileLI ruUploading")
                .prepend("<span class='radIcon'></span>");

        if (this._isManualUpload())
            $content.addClass("ruUploadOnHold");

        if (this._enableInlineProgress) {
            $progress = $('<span class="ruFileProgressWrap"><span class="ruFileProgress"></span></span>');
            $content.append($progress);
        }

        $('.ruFakeInput, .ruBrowse', row).remove();
        $(".ruFileWrap", row).append($content); // Replace fake input
    }
}

Sys.Application.add_load(encodeRowContent);

0 comments