Skip to content

Commit

Permalink
apache#43252 Disable extra links button if link is null or empty (apa…
Browse files Browse the repository at this point in the history
…che#43844) (apache#43851)

* Disable button if link is null or empty

* Fix space

---------

Co-authored-by: Enis Nazif <enis@Eniss-MacBook-Pro.local>
(cherry picked from commit de88182)

Co-authored-by: enisnazif <enisnazif@gmail.com>
  • Loading branch information
jscheffl and enisnazif authored Nov 9, 2024
1 parent c9436b4 commit 20b6ab7
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ const ExtraLinks = ({

const isSanitised = (url: string | null) => {
if (!url) {
return true;
return false; // Empty or null urls should cause the link to be disabled
}
const urlRegex = /^(https?:)/i;
return urlRegex.test(url);
Expand Down

0 comments on commit 20b6ab7

Please sign in to comment.