Commit 913292c
committed
Improved fix for 5089
Fixes #5089
Improvements include:
1) If the URL has been encoded repeatedly, we will continue decoding the URL until it is completely decoded.
2) If the file extension guessed from the URL doesn’t match the mime type, we will respect the mime type and use that to form the file name.
This URL:
https://substackcdn.com/image/fetch/w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%253A%252F%252Fsubstack-post-media.s3.amazonaws.com%252Fpublic%252Fimages%252Fced5d5ad-a0d6-44aa-b6f5-73c0a937d016_3553x5273.jpeg
is double URL encoded and returns a webp file (which can’t be rendered in PDFs, FYI).1 parent aba7f28 commit 913292c
File tree
3 files changed
+45
-5
lines changed- src/resources/filters
- common
- quarto-post
- tests/docs/smoke-all/2023/04/04
3 files changed
+45
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
23 | 36 | | |
24 | 37 | | |
25 | 38 | | |
| |||
109 | 122 | | |
110 | 123 | | |
111 | 124 | | |
112 | | - | |
| 125 | + | |
113 | 126 | | |
114 | | - | |
| 127 | + | |
115 | 128 | | |
116 | 129 | | |
117 | 130 | | |
118 | | - | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
119 | 150 | | |
120 | 151 | | |
121 | 152 | | |
| |||
139 | 170 | | |
140 | 171 | | |
141 | 172 | | |
| 173 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
11 | 10 | | |
12 | 11 | | |
13 | 12 | | |
0 commit comments