Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Double escaping in search results #36

Open
dnitsche opened this issue Feb 4, 2016 · 0 comments
Open

Double escaping in search results #36

dnitsche opened this issue Feb 4, 2016 · 0 comments

Comments

@dnitsche
Copy link

dnitsche commented Feb 4, 2016

There is a problem of double quoting for search results in the title. A simple example is when the issue contains a quote (") in the title.

Problem is in app/views/search/index.html.erb calling
highlight_tokens(truncate(e.event_title, :length => 255), @tokens)
truncate marks the returned text as html_safe, but also highlight_tokens does this.
Fix ist to change the call to
highlight_tokens(truncate(e.event_title, escape: false, :length => 255), @tokens)
which prevents the double escaping.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant