Skip to content
Snippets Groups Projects
Commit eebe5532 authored by Aymeric Bernard's avatar Aymeric Bernard
Browse files

Use encodeURI to avoid attack in image url

parent 2dc86947
No related branches found
No related tags found
No related merge requests found
...@@ -17,14 +17,14 @@ const PureImageRow = ({ row }) => { ...@@ -17,14 +17,14 @@ const PureImageRow = ({ row }) => {
: { height: 'calc(2 * var(--rowHeight))' }; : { height: 'calc(2 * var(--rowHeight))' };
return ( return (
<div className="bloc image-bloc" style={style}> <div className="bloc image-bloc" style={style}>
<img src={row.image} alt="" /> <img src={encodeURI(row.image)} alt="" />
</div> </div>
); );
}; };
const TextAndImageRow = ({ row }) => ( const TextAndImageRow = ({ row }) => (
<div className="bloc image-text-bloc"> <div className="bloc image-text-bloc">
<img className="row-icon" src={row.image} alt="" /> <img className="row-icon" src={encodeURI(row.image)} alt="" />
<div className="text-section">{row.text.map(element => <TextElement element={element} />)}</div> <div className="text-section">{row.text.map(element => <TextElement element={element} />)}</div>
</div> </div>
); );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment