diff --git a/server/models/views/target-area.js b/server/models/views/target-area.js index 24568ecf9..650d8b2a5 100644 --- a/server/models/views/target-area.js +++ b/server/models/views/target-area.js @@ -30,7 +30,7 @@ class ViewModel { flood.situation = flood.situation.trim() const message = flood.situation - situation = `

${message}

` + situation = messageValidator(message) } const dateSituationChanged = flood @@ -59,17 +59,17 @@ class ViewModel { const metaCanonical = `/target-area/${area.code}` Object.assign(this, { - pageTitle: pageTitle, - metaDescription: metaDescription, - metaCanonical: metaCanonical, + pageTitle, + metaDescription, + metaCanonical, placeName: area.name, placeCentre: JSON.parse(area.centroid).coordinates, featureId: area.id, severity: severityLevel, situationChanged, - situation: situation, - parentAreaAlert: parentAreaAlert, - areaDescription: areaDescription, + situation, + parentAreaAlert, + areaDescription, targetArea: area.code, feedback: false, mapTitle, @@ -87,4 +87,8 @@ class ViewModel { } } +function messageValidator (message) { + const strippedMessage = message.replace(/(\r?\n)+/g, '\n') + return strippedMessage.split('\n').map(p => `

${p}

`).join(' ') +} module.exports = ViewModel diff --git a/server/views/recovering-after-a-flood.html b/server/views/recovering-after-a-flood.html index 7842a3665..fbe6b4891 100644 --- a/server/views/recovering-after-a-flood.html +++ b/server/views/recovering-after-a-flood.html @@ -28,7 +28,7 @@

Protect your property from future floods

Suppliers of flood products and services can be found on the Bluepages.

Read the National Flood Forum's advice on how to protect your property from flooding in the future.

Stay healthy

-

You can find general advice about staying healthy after a flood at Public Health England.

+

You can find general advice about staying healthy after a flood.

If you notice a change in the colour, taste or smell of your tap water, stop using it and phone your water company.

You can get support from your local health protection team to prevent and reduce the effect of diseases.

Don’t eat food that’s touched flood water. If your electricity is off, don’t eat fresh food from a fridge after 4 hours or from a freezer after 24 hours.

@@ -37,7 +37,7 @@

Get help

The Environment Agency has specially trained Flood Support Officers across the country who provide information and advice during and after floods. Call Floodline (24-hour service) on 0345 988 1188 or type-talk (for the hard of hearing) on 0345 602 6340 to find out if they’re active in your area.

Get emotional support

Having a flooded home is very stressful. If you need emotional support, contact family and friends, your doctor or an organisation like the Red Cross or the Samaritans.

-

Public Health England offers a guide to mental wellbeing after a flood.

+

The UK Health Security Agency offers a guide to mental wellbeing after a flood.

Apply for financial aid

You may be able to get financial aid for flood recovery. Apply to your local council.