Hi, I encounter HTML validation errors on the pagination links when using custom params.
To repro:
# Controller/context
params = %{"search" => %{"name" => "computer"}}
{:ok, kerosene} = Repo.paginate(Product, params)
# Template
<%= paginate @conn, @kerosene %>
which generates pagination links with the following query string:
?_utf8=%E2%9C%93&page=1&search[name]=computer
And HTML validation errors on w3 as follows:
Bad value /products?_utf8=%E2%9C%93&page=1&search[name]=computer for attribute href on element a: Illegal character in query: [ is not allowed.
The solution is to URL encode the [``] characters. I'm not sure what the recommended functions are to do this though!
Hi, I encounter HTML validation errors on the pagination links when using custom params.
To repro:
which generates pagination links with the following query string:
?_utf8=%E2%9C%93&page=1&search[name]=computerAnd HTML validation errors on w3 as follows:
The solution is to URL encode the
[``]characters. I'm not sure what the recommended functions are to do this though!