0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-24 20:42:43 +00:00

Change to _.escape() to escape HTML characters

This commit is contained in:
Trevor Buckner
2025-01-27 23:34:50 -05:00
parent c1f608d02f
commit d69288076a

View File

@@ -1,4 +1,5 @@
const dedent = require('dedent-tabs').default;
import _ from 'lodash';
const loginUrl = 'https://www.naturalcrit.com/login';
@@ -89,7 +90,7 @@ const errorIndex = (props)=>{
:
**Brew Title:** <pre>${props.brew.brewTitle || 'Unable to show title'}</pre>
**Brew Title:** ${_.escape(props.brew.brewTitle) || 'Unable to show title'}
**Current Authors:** ${props.brew.authors?.map((author)=>{return `[${author}](/user/${author})`;}).join(', ') || 'Unable to list authors'}
@@ -104,7 +105,7 @@ const errorIndex = (props)=>{
:
**Brew Title:** <pre>${props.brew.brewTitle || 'Unable to show title'}</pre>
**Brew Title:** ${_.escape(props.brew.brewTitle) || 'Unable to show title'}
**Current Authors:** ${props.brew.authors?.map((author)=>{return `[${author}](/user/${author})`;}).join(', ') || 'Unable to list authors'}
@@ -181,7 +182,7 @@ const errorIndex = (props)=>{
**Brew ID:** ${props.brew.brewId}
**Brew Title:** <pre>${props.brew.brewTitle}</pre>`,
**Brew Title:** ${_.escape(props.brew.brewTitle)}`,
// ####### Admin page error #######
'52' : dedent`