mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-01-08 16:12:38 +00:00
Change to _.escape() to escape HTML characters
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
const dedent = require('dedent-tabs').default;
|
const dedent = require('dedent-tabs').default;
|
||||||
|
import _ from 'lodash';
|
||||||
|
|
||||||
const loginUrl = 'https://www.naturalcrit.com/login';
|
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'}
|
**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'}
|
**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 ID:** ${props.brew.brewId}
|
||||||
|
|
||||||
**Brew Title:** <pre>${props.brew.brewTitle}</pre>`,
|
**Brew Title:** ${_.escape(props.brew.brewTitle)}`,
|
||||||
|
|
||||||
// ####### Admin page error #######
|
// ####### Admin page error #######
|
||||||
'52' : dedent`
|
'52' : dedent`
|
||||||
|
|||||||
Reference in New Issue
Block a user