diff --git a/components/BackgroundSelect.js b/components/BackgroundSelect.js index 212b1ff..6293467 100644 --- a/components/BackgroundSelect.js +++ b/components/BackgroundSelect.js @@ -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, '>') + .replace(/"/g, '"') + .replace(/'/g, ''') + .replace(/\//g, '/')}; background-size: auto; background-repeat: repeat;`}; } diff --git a/pages/editor.js b/pages/editor.js index 2814f8a..04f4c10 100644 --- a/pages/editor.js +++ b/pages/editor.js @@ -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, '&') .replace(//g, '>') - .replace(/"/g, '"') - .replace(/'/g, ''') .replace(/\//g, '/') }