0
0
Fork 0

Fix titles being escaped twice (#32889)

This commit is contained in:
Claire 2024-11-14 14:28:00 +01:00 committed by GitHub
parent ec663eaba1
commit e8b6607ece
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 9 additions and 17 deletions

View file

@ -257,11 +257,11 @@ RSpec.describe ApplicationHelper do
expect(helper.html_title).to be_html_safe
end
it 'removes extra new lines' do
it 'does not escape twice' do
Setting.site_title = 'Site Title'
helper.content_for(:page_title, "Test Value\n")
helper.content_for(:page_title, '"Test Value"'.html_safe)
expect(helper.html_title).to eq 'Test Value - Site Title'
expect(helper.html_title).to eq '"Test Value" - Site Title'
expect(helper.html_title).to be_html_safe
end
end