mirror of
https://github.com/yogstation13/Yogstation.git
synced 2025-02-26 09:04:50 +00:00
Merge pull request #40654 from tgstation/MrStonedOne-patch-goonchat-fix
Port paradise goonchat uridecode fix
This commit is contained in:
committed by
yogstation13-bot
parent
b148d7328a
commit
7dd12986d5
@@ -158,7 +158,16 @@ function byondDecode(message) {
|
||||
// The replace for + is because FOR SOME REASON, BYOND replaces spaces with a + instead of %20, and a plus with %2b.
|
||||
// Marvelous.
|
||||
message = message.replace(/\+/g, "%20");
|
||||
message = decoder(message);
|
||||
try {
|
||||
// This is a workaround for the above not always working when BYOND's shitty url encoding breaks. (byond bug id:2399401)
|
||||
if (decodeURIComponent) {
|
||||
message = decodeURIComponent(message);
|
||||
} else {
|
||||
throw new Error("Easiest way to trigger the fallback")
|
||||
}
|
||||
} catch (err) {
|
||||
message = unescape(message);
|
||||
}
|
||||
return message;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user