From 60d191cd6d02716e9b9f163c6a4e0ee186f7467a Mon Sep 17 00:00:00 2001 From: Anthony Shull Date: Thu, 13 Feb 2025 09:36:33 -0600 Subject: [PATCH] fix file download link (#2383) --- lib/dotcom_web/controllers/event_controller.ex | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/dotcom_web/controllers/event_controller.ex b/lib/dotcom_web/controllers/event_controller.ex index eaac8c0ed8..afbb8621ae 100644 --- a/lib/dotcom_web/controllers/event_controller.ex +++ b/lib/dotcom_web/controllers/event_controller.ex @@ -126,12 +126,13 @@ defmodule DotcomWeb.EventController do title |> String.downcase() |> String.replace(" ", "_") - |> decode_ampersand_html_entity + |> URI.encode_www_form() + |> decode_ampersand_html_entity() end @spec decode_ampersand_html_entity(String.t()) :: String.t() defp decode_ampersand_html_entity(string) do - String.replace(string, "&", "&") + String.replace(string, "%26", "&") end @doc "Returns a list of years with which we can filter events.