Skip to content

Commit db744a7

Browse files
committed
add prettificaiton n fix decode err
1 parent 8c0b315 commit db744a7

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

src/components/app.jsx

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -97,12 +97,8 @@ if (location.search) {
9797
}
9898

9999
const params = new URLSearchParams(location.search);
100-
window.codeHtml = params.get('html')
101-
? decodeURIComponent(params.get('html'))
102-
: '';
103-
window.codeCss = params.get('css')
104-
? decodeURIComponent(params.get('css'))
105-
: '';
100+
window.codeHtml = params.get('html') || '';
101+
window.codeCss = params.get('css') || '';
106102
}
107103

108104
export default class App extends Component {
@@ -236,6 +232,8 @@ export default class App extends Component {
236232
db.getSettings(this.defaultSettings).then(result => {
237233
if (window.codeHtml || window.codeCss) {
238234
log('Load item from query params', lastCode);
235+
this.prettifyHandler('html');
236+
this.prettifyHandler('css');
239237
this.setCurrentItem(this.state.currentItem).then(() => {
240238
this.refreshEditor();
241239
});

0 commit comments

Comments
 (0)