diff options
| author | yo momma <shutup@oops.wtf> | 2026-01-30 08:46:18 +0000 |
|---|---|---|
| committer | yo momma <shutup@oops.wtf> | 2026-01-30 08:46:18 +0000 |
| commit | 5aea6f7791d9a5238581b04d2198205c90495baf (patch) | |
| tree | 35e550bd2d58b756ad018708955123f616212b47 /static/js/src/text.js | |
| parent | 2e71933790cb3223f7690335eeb66c0c187dbec0 (diff) | |
Fix: upgrade hotlinked http URLs on HTTPS
Diffstat (limited to 'static/js/src/text.js')
| -rwxr-xr-x | static/js/src/text.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/static/js/src/text.js b/static/js/src/text.js index f426255..6fe5c3c 100755 --- a/static/js/src/text.js +++ b/static/js/src/text.js @@ -25,9 +25,10 @@ function getImagesAsArray(text) { if (urls === null) return imgs for (var i = 0; i<urls.length; i++){ var url = urls[i] - var urlWithoutParams = url.replace(/\?.*$/i, ""); + var normalized = normalizeUrl(url); + var urlWithoutParams = normalized.replace(/[?#].*$/i, ""); if (PicRegex.test(urlWithoutParams)) - imgs.push(url) + imgs.push(normalized) } return imgs } |
