Skip to content

Commit

Permalink
Merge branch 'development' into release/6.7.4
Browse files Browse the repository at this point in the history
  • Loading branch information
LeeGordon83 committed Jul 28, 2023
2 parents 76cc77a + 2411df6 commit db492db
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 deletions.
18 changes: 11 additions & 7 deletions server/models/views/target-area.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class ViewModel {
flood.situation = flood.situation.trim()
const message = flood.situation

situation = `<p>${message}</p>`
situation = messageValidator(message)
}

const dateSituationChanged = flood
Expand Down Expand Up @@ -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,
Expand All @@ -87,4 +87,8 @@ class ViewModel {
}
}

function messageValidator (message) {
const strippedMessage = message.replace(/(\r?\n)+/g, '\n')
return strippedMessage.split('\n').map(p => `<p>${p}</p>`).join(' ')
}
module.exports = ViewModel
4 changes: 2 additions & 2 deletions server/views/recovering-after-a-flood.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ <h2 class="govuk-heading-m">Protect your property from future floods</h2>
<p class="govuk-text">Suppliers of flood products and services can be found on the <a href="http://bluepages.org.uk">Bluepages</a>.</p>
<p class="govuk-text">Read the National Flood Forum's advice on <a href="https://nationalfloodforum.org.uk/about-flooding/reducing-your-risk/protecting-your-property">how to protect your property from flooding in the future</a>.</p>
<h2 class="govuk-heading-m">Stay healthy</h2>
<p class="govuk-text">You can find general advice about <a href="https://www.gov.uk/government/publications/flooding-questions-and-answers-about-health">staying healthy after a flood</a> at Public Health England.</p>
<p class="govuk-text">You can find general advice about <a href="https://www.gov.uk/government/publications/flooding-questions-and-answers-about-health">staying healthy after a flood</a>.</p>
<p class="govuk-text">If you notice a change in the colour, taste or smell of your tap water, stop using it and phone your water company.</p>
<p class="govuk-text">You can get support from <a href="https://www.gov.uk/health-protection-team">your local health protection team</a> to prevent and reduce the effect of diseases.</p>
<p class="govuk-text">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.</p>
Expand All @@ -37,7 +37,7 @@ <h2 class="govuk-heading-m">Get help</h2>
<p class="govuk-text">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.</p>
<h2 class="govuk-heading-m">Get emotional support</h2>
<p class="govuk-text">Having a flooded home is very stressful. If you need emotional support, contact family and friends, your doctor or an organisation like the <a data-journey-click="PRR:recovering-after-a-flood_Get emotional support:Red Cross" href="http://www.redcross.org.uk">Red Cross</a> or the <a data-journey-click="PRR:recovering-after-a-flood_Get emotional support:Samaritans" href="https://www.samaritans.org">Samaritans</a>.</p>
<p class="govuk-text">Public Health England offers a <a href="https://www.gov.uk/government/publications/flooding-health-advice-mental-health-following-floods">guide to mental wellbeing</a> after a flood.</p>
<p class="govuk-text">The UK Health Security Agency offers a <a href="https://www.gov.uk/government/publications/flooding-health-advice-mental-health-following-floods">guide to mental wellbeing</a> after a flood.</p>
<h2 class="govuk-heading-m">Apply for financial aid</h2>
<p class="govuk-text">You may be able to get financial aid for flood recovery. Apply to <a href="https://www.gov.uk/find-local-council">your local council</a>.</p>
</div>
Expand Down

0 comments on commit db492db

Please sign in to comment.