diff --git a/lib/pinchflat_web/components/core_components.ex b/lib/pinchflat_web/components/core_components.ex index 7279e28..0bad772 100644 --- a/lib/pinchflat_web/components/core_components.ex +++ b/lib/pinchflat_web/components/core_components.ex @@ -19,6 +19,7 @@ defmodule PinchflatWeb.CoreComponents do import PinchflatWeb.Gettext alias Phoenix.LiveView.JS + alias PinchflatWeb.CustomComponents.TextComponents @doc """ Renders a modal. @@ -644,10 +645,8 @@ defmodule PinchflatWeb.CoreComponents do
- <%= if is_binary(v) and String.starts_with?(v, "http") do %>
- <.link class="underline decoration-bodydark decoration-1 hover:decoration-white" href={v} target="_blank">
- <%= v %>
-
+ <%= if is_binary(v) && URI.parse(v).scheme && URI.parse(v).scheme =~ "http" do %>
+ <%= v %>
<% else %>
<%= v %>
<% end %>