Skip to content
This repository has been archived by the owner on Dec 29, 2022. It is now read-only.

Commit

Permalink
fix(devtool): upload 字符转义
Browse files Browse the repository at this point in the history
  • Loading branch information
NewFuture committed Sep 11, 2019
1 parent f55dc80 commit 9f7d8c3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/tasks/devtool.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ function getSize(path) {
* @param {string} s
*/
function encode(s) {
return s.replace(/&|<|>/g, escape).replace(/\n/g, ' ');
return s.trim().replace(/&|<|>/g, escape).replace(/\r?\n/g, '%0A').replace(/\s/g, '%20');
}

/**
Expand Down

0 comments on commit 9f7d8c3

Please # to comment.