We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
We are using the latest flutie gem in our Rails 6.1.5 app with the following code:
flutie
app/views/pages/show.html.erb
<% content_for :page_title, @page.title %>
app/views/layouts/application.html.erb
<title><%= page_title %></title>
For titles that contain characters that need to be HTML-escaped, we've noticed them being double-HTML-escaped.
For example, for the title Page & "Title" we get
Page & "Title"
<title>App : Page &amp; &quot;Title&quot;</title>
which causes the browser to display it as
Instead, we expected to get
<title>App : Page & "Title"</title>
which displays as expected
We can replace <%= page_title %> with <%== page_title %> or <%= raw page_title %> to work around it.
<%= page_title %>
<%== page_title %>
<%= raw page_title %>
The text was updated successfully, but these errors were encountered:
Here is a spec that asserts it already HTML-escapes characters: elias19r@2165815
Sorry, something went wrong.
No branches or pull requests
Context
We are using the latest
flutie
gem in our Rails 6.1.5 app with the following code:app/views/pages/show.html.erb
app/views/layouts/application.html.erb
Issue
For titles that contain characters that need to be HTML-escaped, we've noticed them being double-HTML-escaped.
For example, for the title
Page & "Title"
we getwhich causes the browser to display it as
Instead, we expected to get
which displays as expected
Workaround
We can replace
<%= page_title %>
with<%== page_title %>
or<%= raw page_title %>
to work around it.The text was updated successfully, but these errors were encountered: