From: Hank Grabowski Date: Sun, 19 Mar 2023 01:52:53 +0000 (-0400) Subject: Fix over-aggressive lowercasing of url, title, image, and preview fields X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=6db244f47613b56ba559a88341577eebe24ec765;p=friendica.git Fix over-aggressive lowercasing of url, title, image, and preview fields --- diff --git a/view/js/linkPreview.js b/view/js/linkPreview.js index 293020bc82..e0ce0f64f5 100644 --- a/view/js/linkPreview.js +++ b/view/js/linkPreview.js @@ -548,12 +548,12 @@ matches = attributes.match(/url='([\s\S]*?)'/im); if (matches !== null && typeof matches[1] !== 'undefined') { - url = matches[1].toLowerCase(); + url = matches[1]; } matches = attributes.match(/url="([\s\S]*?)"/im); if (matches !== null && typeof matches[1] !== 'undefined') { - url = matches[1].toLowerCase(); + url = matches[1]; } if(url !== '') { @@ -564,12 +564,12 @@ matches = attributes.match(/title='([\s\S]*?)'/im); if (matches !== null && typeof matches[1] !== 'undefined') { - title = matches[1].toLowerCase(); + title = trim(matches[1]); } matches = attributes.match(/title="([\s\S]*?)"/im); if (matches !== null && typeof matches[1] !== 'undefined') { - title = matches[1].toLowerCase(); + title = trim(matches[1]); } if (title !== '') { @@ -580,12 +580,12 @@ matches = attributes.match(/image='([\s\S]*?)'/im); if (matches !== null && typeof matches[1] !== 'undefined') { - image = matches[1].toLowerCase(); + image = trim(matches[1]); } matches = attributes.match(/image="([\s\S]*?)"/im); if (matches !== null && typeof matches[1] !== 'undefined') { - image = matches[1].toLowerCase(); + image = trim(matches[1]); } if (image !== '') { @@ -596,12 +596,12 @@ matches = attributes.match(/preview='([\s\S]*?)'/im); if (matches !== null && typeof matches[1] !== 'undefined') { - preview = matches[1].toLowerCase(); + preview = trim(matches[1]); } matches = attributes.match(/preview="([\s\S]*?)"/im); if (matches !== null && typeof matches[1] !== 'undefined') { - preview = matches[1].toLowerCase(); + preview = trim(matches[1]); } if (preview !== '') {