fix: 修复Xi'an传参问题

This commit is contained in:
chenjinsong
2023-05-22 11:20:25 +08:00
parent 1b64f3c544
commit b753e262fe

View File

@@ -878,9 +878,9 @@ export async function getDnsMapData (type) {
}
export function handleSpecialValue (value) {
if (value) {
value = value.replace(/\'/g, "\\\\'")
.replace(/\"/g, '\\"')
.replace(/\&/g, '%26')
value = value.replace(/\'/g, "\\'\\'") // Xi'an -> Xi''an
.replace(/\"/g, '\\"') // ISP中可能有带双引号的数据
.replace(/\&/g, '%26') // ISP中可能有带&的数据
}
return value
}