potiuk commented on code in PR #41995:
URL: https://github.com/apache/airflow/pull/41995#discussion_r1744040814
##########
airflow/www/static/js/dag/details/taskInstance/ExtraLinks.tsx:
##########
@@ -57,8 +57,15 @@ const ExtraLinks = ({
if (!url) {
return true;
}
- const urlRegex = /^(https?:)/i;
- return urlRegex.test(url);
+ const path = new URL(url, "http://localhost");
Review Comment:
Hmm. I think this won't work for absolute URLs now
```
URL("http://www.apache.org", "http://localhost")b x xx
```
-> `Uncaught TypeError: Failed to construct 'URL': Please use the 'new'
operator, this DOM object constructor cannot be called as a function.
at <anonymous>:1:1`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]