I am getting this error when i try to use the code below,
link_to params.merge(:sort => column, :direction => direction, :page => nil) do
"#{title} #{content_tag(:i, "", class: "fa fa-chevron-#{direction == 'asc' ? 'up': 'down'}") }".html_safe
end
specifically seems to happen when i add params.merge there. What is the real cause and what should i do?
full error message
Attempting to generate a URL from non-sanitized request parameters! An attacker can inject malicious data into the generated URL, such as changing the host. Whitelist and sanitize passed parameters to be secure.
using Rails version 5.
bundle update will_paginate
or use it from github in your gemfile – Gooseherd