Patch #26682 » 0001-URL-escape-additional-characters-with-special-meanin.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) |
|
| 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/)) {
|
- « Previous
- 1
- …
- 3
- 4
- 5
- Next »