         ControllerHelpers.render_error(conn, 400, gettext("Invalid id."))
     end
   end
-end+end

          400,
          gettext("Invalid URL: %{url}", url: conn.params["url"])
        )
      url ->
        assign(conn, :input_url, url)
    end

        true ->
          URI.to_string(%URI{
            host: url.host |> :idna.utf8_to_ascii() |> List.to_string() |> String.downcase(),
            path: if(@check_host_only, do: nil, else: url.path),
            query: if(@check_host_only, do: nil, else: url.query),
            scheme: "http"
          })

