Project

General

Profile

Patch #26682 » 0001-URL-escape-additional-characters-with-special-meanin.patch

Holger Just, 2017-08-15 12:11

View differences:

public/javascripts/attachments.js
214 214
    var cursorPosition = $textarea.prop('selectionStart');
215 215
    var description = $textarea.val();
216 216
    var sanitizedFilename = file.name.replace(/[\/\?\%\*\:\|\"\'<>\n\r]+/, '_');
217
    var inlineFilename = encodeURIComponent(sanitizedFilename);
217
    var inlineFilename = encodeURIComponent(sanitizedFilename)
218
      .replace(/[!()]/g, function(match) { return "%" + match.charCodeAt(0).toString(16) });
218 219
    var newLineBefore = true;
219 220
    var newLineAfter = true;
220 221
    if(cursorPosition === 0 || description.substr(cursorPosition-1,1).match(/\r|\n/)) {
(5-5/5)