Mike Fix 7 years ago
parent a998ccf139
commit b44ecff6ea

@ -116,7 +116,13 @@ class BackgroundSelect extends React.Component {
? `background: url(${this.props.config.backgroundImage});
background-size: cover;
background-repeat: no-repeat;`
: `background: ${this.props.config.backgroundColor || config.backgroundColor};
: `background: ${(this.props.config.backgroundColor || config.backgroundColor)
.replace(/&/g, '&')
.replace(/</g, '&lt;')
.replace(/>/g, '&gt;')
.replace(/"/g, '&quot;')
.replace(/'/g, '&#x27;')
.replace(/\//g, '&#x2F;')};
background-size: auto;
background-repeat: repeat;`};
}

@ -33,11 +33,8 @@ import { getState, saveState } from '../lib/util'
const removeQueryString = str => {
const qI = str.indexOf('?')
return (qI >= 0 ? str.substr(0, qI) : str)
.replace(/&/g, '&amp;')
.replace(/</g, '&lt;')
.replace(/>/g, '&gt;')
.replace(/"/g, '&quot;')
.replace(/'/g, '&#x27;')
.replace(/\//g, '&#x2F;')
}

Loading…
Cancel
Save