Patch #26682 » 0001-URL-escape-the-character-in-generated-markup-for-dro.patch
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).replace('!', '%21');
|
|
218 | 218 |
var newLineBefore = true; |
219 | 219 |
var newLineAfter = true; |
220 | 220 |
if(cursorPosition === 0 || description.substr(cursorPosition-1,1).match(/\r|\n/)) { |