Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion cinemas/thehorsehospital.com/transform.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const cheerio = require("cheerio");
const { decode } = require("html-entities");
const {
getText,
generateShowingId,
Expand Down Expand Up @@ -32,7 +33,9 @@ async function transform({ moviePages }, sourcedEvents) {
const $ = cheerio.load(moviePage);
const eventData = getEventJsonLd($);
const id = $("article.eventitem").attr("data-item-id");
const title = eventData.name.replace(" — The Horse Hospital", "");
// Squarespace writes the name into the JSON-LD HTML-escaped ("&"), and
// JSON.parse leaves that alone.
const title = decode(eventData.name).replace(" — The Horse Hospital", "");
const date = new Date(eventData.startDate);
const description = getText($(".sqs-html-content"));

Expand Down
2 changes: 1 addition & 1 deletion common/tests/test-titles.json
Original file line number Diff line number Diff line change
Expand Up @@ -101312,7 +101312,7 @@
"output": "consumed a contemporary asian horror showcase"
},
{
"input": "'RAFT' & The Parlour Collective & 'The Moon Over The Alley'",
"input": "'RAFT' & The Parlour Collective & 'The Moon Over The Alley'",
"output": "raft the parlour collective the moon over the alley"
},
{
Expand Down
Loading