Escape titles to avoid encoding issues (#7535)

This commit is contained in:
rhymes 2020-04-27 18:27:19 +02:00 committed by GitHub
parent dfd8b0bf86
commit 8b82103fd0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -23,12 +23,14 @@ RSpec.describe "/internal/listings", type: :request do
it "filters unpublished listings by default" do
get internal_listings_path
expect(response.body).not_to match(unpublished_listing.title)
expect(response.body).not_to include(CGI.escapeHTML(unpublished_listing.title))
end
it "includes unpublished listings when asked to" do
get internal_listings_path, params: { include_unpublished: "1" }
expect(response.body).to match(unpublished_listing.title)
expect(response.body).to include(CGI.escapeHTML(unpublished_listing.title))
end
end
end