Don't put UTF-8 in search URL (#15)

Also fix TeX-style quoting
This commit is contained in:
Jeremy Tan Jie Rui 2020-01-02 11:09:53 +08:00 committed by liamwhite
parent 2e7937cbc3
commit c4e6a988d4
2 changed files with 2 additions and 2 deletions

View file

@ -140,7 +140,7 @@ defmodule PhilomenaWeb.TagController do
%{aliased_tag: tag} -> %{aliased_tag: tag} ->
conn conn
|> put_flash(:info, "This tag (`#{conn.assigns.tag.name}') has been aliased into the tag `#{tag.name}'.") |> put_flash(:info, "This tag (\"#{conn.assigns.tag.name}\") has been aliased into the tag \"#{tag.name}\".")
|> redirect(to: Routes.tag_path(conn, :show, tag)) |> redirect(to: Routes.tag_path(conn, :show, tag))
end end
end end

View file

@ -11,7 +11,7 @@ header.header
a.header__link.hide-mobile href="/images/new" title="Upload" a.header__link.hide-mobile href="/images/new" title="Upload"
i.fa.fa-upload i.fa.fa-upload
= form_for @conn, Routes.search_path(@conn, :index), [method: "get", class: "header__search flex flex--no-wrap flex--centered"], fn f -> = form_for @conn, Routes.search_path(@conn, :index), [method: "get", class: "header__search flex flex--no-wrap flex--centered", enforce_utf8: false], fn f ->
input.input.header__input.header__input--search#q name="q" title="For terms all required, separate with ',' or 'AND'; also supports 'OR' for optional terms and '-' or 'NOT' for negation. Search with a blank query for more options or click the ? for syntax help." value=@conn.params["q"] placeholder="Search" autocapitalize="none" input.input.header__input.header__input--search#q name="q" title="For terms all required, separate with ',' or 'AND'; also supports 'OR' for optional terms and '-' or 'NOT' for negation. Search with a blank query for more options or click the ? for syntax help." value=@conn.params["q"] placeholder="Search" autocapitalize="none"
= if present?(@conn.params["sf"]) do = if present?(@conn.params["sf"]) do