From 61b7c347a1e44263e7288c8bb27fea5da0350064 Mon Sep 17 00:00:00 2001 From: Robustin Date: Wed, 19 Aug 2015 15:43:01 -0400 Subject: [PATCH] Fixes Announcements Garbling Maybe... Doubtfully... But I wanted to give it a try since I'm tired of my glorious pronouncements garbled in &39 If I actually fixed it then I should get a medal for best coding by someone who can't code. My logic was that WHISPER works just fine with apostrophes and ampersands but shuttle call reasons, announcements, etc. would get that garbled text when using apostrophes and ampersands. With whispers trim is on the "inside", with stripped_input that is used for these announcements trim is on the "outside". It makes intuitive sense to me that whoever wrote that stripped_input comment might have gotten things flipped since if trim is on the inside, and it allows single symbols to pass through, then there's nothing to filter html_encode from spewing that garbage out. If this isn't the correct fix then at least I should be close enough that someone can point me in the right direction. --- code/controllers/subsystem/shuttles.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/controllers/subsystem/shuttles.dm b/code/controllers/subsystem/shuttles.dm index 71ed49b0394..edeb8493cdb 100644 --- a/code/controllers/subsystem/shuttles.dm +++ b/code/controllers/subsystem/shuttles.dm @@ -112,7 +112,7 @@ var/datum/subsystem/shuttle/SSshuttle user << "The emergency shuttle has been disabled by Centcom." return - call_reason = html_encode(trim(call_reason)) + call_reason = trim(html_encode(call_reason)) if(length(call_reason) < CALL_SHUTTLE_REASON_LENGTH) user << "You must provide a reason."