Fossil SCM
When creating a hyperlink via line selection and the mouse in the /file view, do not decode the inbound URL, to avoid mis-handling of filenames which contain + signs. This resolves [forum:6f276193d2cfa5ab|forum post 6f276193d2cfa5ab].
Commit
7641c8296144dd9000c5a571d290d07a7e0508c947564639af666987897f4e92
Parent
92cdafddbb402ac…
1 file changed
+1
-4
+1
-4
| --- src/fossil.numbered-lines.js | ||
| +++ src/fossil.numbered-lines.js | ||
| @@ -21,14 +21,11 @@ | ||
| 21 | 21 | const tdLn = tbl.querySelector('td.line-numbers'); |
| 22 | 22 | const urlArgsRaw = (window.location.search||'?') |
| 23 | 23 | .replace(/&?\budc=[^&]*/,'') /* "update display prefs cookie" */ |
| 24 | 24 | .replace(/&?\bln=[^&]*/,'') /* inbound line number/range */ |
| 25 | 25 | .replace('?&','?'); |
| 26 | - var urlArgsDecoded = urlArgsRaw; | |
| 27 | - try{urlArgsDecoded = decodeURIComponent(urlArgsRaw);} | |
| 28 | - catch{} | |
| 29 | - const lineState = { urlArgs: urlArgsDecoded, start: 0, end: 0 }; | |
| 26 | + const lineState = { urlArgs: urlArgsRaw, start: 0, end: 0 }; | |
| 30 | 27 | const lineTip = new F.PopupWidget({ |
| 31 | 28 | style: { |
| 32 | 29 | cursor: 'pointer' |
| 33 | 30 | }, |
| 34 | 31 | refresh: function(){ |
| 35 | 32 |
| --- src/fossil.numbered-lines.js | |
| +++ src/fossil.numbered-lines.js | |
| @@ -21,14 +21,11 @@ | |
| 21 | const tdLn = tbl.querySelector('td.line-numbers'); |
| 22 | const urlArgsRaw = (window.location.search||'?') |
| 23 | .replace(/&?\budc=[^&]*/,'') /* "update display prefs cookie" */ |
| 24 | .replace(/&?\bln=[^&]*/,'') /* inbound line number/range */ |
| 25 | .replace('?&','?'); |
| 26 | var urlArgsDecoded = urlArgsRaw; |
| 27 | try{urlArgsDecoded = decodeURIComponent(urlArgsRaw);} |
| 28 | catch{} |
| 29 | const lineState = { urlArgs: urlArgsDecoded, start: 0, end: 0 }; |
| 30 | const lineTip = new F.PopupWidget({ |
| 31 | style: { |
| 32 | cursor: 'pointer' |
| 33 | }, |
| 34 | refresh: function(){ |
| 35 |
| --- src/fossil.numbered-lines.js | |
| +++ src/fossil.numbered-lines.js | |
| @@ -21,14 +21,11 @@ | |
| 21 | const tdLn = tbl.querySelector('td.line-numbers'); |
| 22 | const urlArgsRaw = (window.location.search||'?') |
| 23 | .replace(/&?\budc=[^&]*/,'') /* "update display prefs cookie" */ |
| 24 | .replace(/&?\bln=[^&]*/,'') /* inbound line number/range */ |
| 25 | .replace('?&','?'); |
| 26 | const lineState = { urlArgs: urlArgsRaw, start: 0, end: 0 }; |
| 27 | const lineTip = new F.PopupWidget({ |
| 28 | style: { |
| 29 | cursor: 'pointer' |
| 30 | }, |
| 31 | refresh: function(){ |
| 32 |