From c4e6a988d4b2e7063f492dfb4b4b17e751ca6728 Mon Sep 17 00:00:00 2001 From: Jeremy Tan Jie Rui Date: Thu, 2 Jan 2020 11:09:53 +0800 Subject: [PATCH] Don't put UTF-8 in search URL (#15) Also fix TeX-style quoting --- lib/philomena_web/controllers/tag_controller.ex | 2 +- lib/philomena_web/templates/layout/_header.html.slime | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/philomena_web/controllers/tag_controller.ex b/lib/philomena_web/controllers/tag_controller.ex index e9124be2..9cb78253 100644 --- a/lib/philomena_web/controllers/tag_controller.ex +++ b/lib/philomena_web/controllers/tag_controller.ex @@ -140,7 +140,7 @@ defmodule PhilomenaWeb.TagController do %{aliased_tag: tag} -> 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)) end end diff --git a/lib/philomena_web/templates/layout/_header.html.slime b/lib/philomena_web/templates/layout/_header.html.slime index 6cc57fb7..947b1a55 100644 --- a/lib/philomena_web/templates/layout/_header.html.slime +++ b/lib/philomena_web/templates/layout/_header.html.slime @@ -11,7 +11,7 @@ header.header a.header__link.hide-mobile href="/images/new" title="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" = if present?(@conn.params["sf"]) do