mirror of
https://github.com/Av0idD4rk/packmate.git
synced 2026-10-25 03:49:26 +00:00
Fix unicode in packets
This commit is contained in:
parent
b55003488a
commit
f7090b6efe
@ -32,14 +32,14 @@
|
|||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
hexdata() {
|
hexdata() {
|
||||||
const dataString = atob(this.packet.content);
|
const dataString = this.atou(this.packet.content);
|
||||||
const dump = this.hexdump(dataString, this.$store.state.hexdumpBlockSize, this.$store.state.hexdumpLineNumberBase);
|
const dump = this.hexdump(dataString, this.$store.state.hexdumpBlockSize, this.$store.state.hexdumpLineNumberBase);
|
||||||
return this.escapeHtml(dump)
|
return this.escapeHtml(dump)
|
||||||
.split('\n')
|
.split('\n')
|
||||||
.join('<br>'); // Replace all \n to <br>
|
.join('<br>'); // Replace all \n to <br>
|
||||||
},
|
},
|
||||||
stringdata() {
|
stringdata() {
|
||||||
const dataString = atob(this.packet.content);
|
const dataString = this.atou(this.packet.content);
|
||||||
const dump = this.highlightPatterns(dataString);
|
const dump = this.highlightPatterns(dataString);
|
||||||
return this.escapeHtml(dump)
|
return this.escapeHtml(dump)
|
||||||
.split('\n')
|
.split('\n')
|
||||||
@ -47,6 +47,9 @@
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
atou(b64) {
|
||||||
|
return decodeURIComponent(escape(atob(b64)));
|
||||||
|
},
|
||||||
printPacketFlags(packet) {
|
printPacketFlags(packet) {
|
||||||
let flags = [];
|
let flags = [];
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user