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

Commit 9f7d8c3

Browse files
committed
fix(devtool): upload 字符转义
1 parent f55dc80 commit 9f7d8c3

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/tasks/devtool.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ function getSize(path) {
132132
* @param {string} s
133133
*/
134134
function encode(s) {
135-
return s.replace(/&|<|>/g, escape).replace(/\n/g, ' ');
135+
return s.trim().replace(/&|<|>/g, escape).replace(/\r?\n/g, '%0A').replace(/\s/g, '%20');
136136
}
137137

138138
/**

0 commit comments

Comments
 (0)