mirror of
https://github.com/ventoy/Ventoy.git
synced 2025-08-28 00:11:15 +00:00
VentoyPlugson: Fix the garbled preview json for unicode characters.
This commit is contained in:
@@ -1,4 +1,13 @@
|
||||
|
||||
function VtoyUTF16HexToAscii(hex) {
|
||||
var str = "";
|
||||
for (var i = 0; i < hex.length; i += 4) {
|
||||
str += String.fromCharCode(parseInt(hex.substring(i, i + 4), 16));
|
||||
}
|
||||
|
||||
return str;
|
||||
}
|
||||
|
||||
function ventoy_replace_slash(str) {
|
||||
var str1 = str.replace(/\\/g, '/');
|
||||
var str2 = str1.replace(/\/\//g, '/');
|
||||
|
Reference in New Issue
Block a user