diff --git a/cinemas/thehorsehospital.com/transform.js b/cinemas/thehorsehospital.com/transform.js index 04e8a62e..b46b5418 100644 --- a/cinemas/thehorsehospital.com/transform.js +++ b/cinemas/thehorsehospital.com/transform.js @@ -1,4 +1,5 @@ const cheerio = require("cheerio"); +const { decode } = require("html-entities"); const { getText, generateShowingId, @@ -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")); diff --git a/common/tests/test-titles.json b/common/tests/test-titles.json index 1e42824e..5e4eaa5c 100644 --- a/common/tests/test-titles.json +++ b/common/tests/test-titles.json @@ -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" }, {