mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-19 15:26:36 +00:00
Fix attribute url links (#16462)
This commit is contained in:
parent
36a87da1fe
commit
a5ba2499c0
@ -45,7 +45,7 @@ export const computeAttributeValueDisplay = (
|
|||||||
// If invalid URL, exception will be raised
|
// If invalid URL, exception will be raised
|
||||||
const url = new URL(attributeValue);
|
const url = new URL(attributeValue);
|
||||||
if (url.protocol === "http:" || url.protocol === "https:")
|
if (url.protocol === "http:" || url.protocol === "https:")
|
||||||
return html`<a target="_blank" rel="noreferrer" href=${value}
|
return html`<a target="_blank" rel="noreferrer" href=${attributeValue}
|
||||||
>${attributeValue}</a
|
>${attributeValue}</a
|
||||||
>`;
|
>`;
|
||||||
} catch (_) {
|
} catch (_) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user