diff --git a/code/modules/admin/verbs/adminhelp.dm b/code/modules/admin/verbs/adminhelp.dm
index 4348ae7661..45d05c70b9 100644
--- a/code/modules/admin/verbs/adminhelp.dm
+++ b/code/modules/admin/verbs/adminhelp.dm
@@ -174,7 +174,7 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new)
//is_bwoink is TRUE if this ticket was started by an admin PM
/datum/admin_help/New(msg, client/C, is_bwoink)
//clean the input msg
- msg = sanitize(copytext_char(msg,1,MAX_MESSAGE_LEN))
+ msg = copytext_char(msg,1,MAX_MESSAGE_LEN)
if(!msg || !C || !C.mob)
qdel(src)
return
@@ -263,7 +263,7 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new)
//message from the initiator without a target, all admins will see this
//won't bug irc
/datum/admin_help/proc/MessageNoRecipient(msg)
- msg = sanitize(copytext_char(msg, 1, MAX_MESSAGE_LEN))
+ msg = copytext_char(msg, 1, MAX_MESSAGE_LEN)
var/ref_src = "[REF(src)]"
//Message to be sent to all admins
var/admin_msg = "Ticket [TicketHref("#[id]", ref_src)]: [LinkedReplyName(ref_src)] [FullMonty(ref_src)]: [keywords_lookup(msg)]"
@@ -523,7 +523,7 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new)
if(handle_spam_prevention(msg,MUTE_ADMINHELP))
return
- msg = trim(msg)
+ msg = sanitize(trim(msg))
if(!msg)
return
diff --git a/code/modules/admin/verbs/adminpm.dm b/code/modules/admin/verbs/adminpm.dm
index 2931c52a5c..1f4313dfda 100644
--- a/code/modules/admin/verbs/adminpm.dm
+++ b/code/modules/admin/verbs/adminpm.dm
@@ -80,6 +80,12 @@
to_chat(src, "Message: [msg]", confidential = TRUE)
return
+ //clean the message if it's not sent by a high-rank admin
+ if(!check_rights(R_SERVER|R_DEBUG,0)||external)//no sending html to the poor bots
+ msg = sanitize(copytext_char(msg, 1, MAX_MESSAGE_LEN))
+ if(!msg)
+ return
+
var/client/recipient
var/recipient_ckey // Stored in case client is deleted between this and after the message is input
var/datum/admin_help/recipient_ticket // Stored in case client is deleted between this and after the message is input
@@ -141,15 +147,9 @@
to_chat(src, "Error: Admin-PM: You are unable to use admin PM-s (muted).", confidential = TRUE)
return
- if (src.handle_spam_prevention(msg,MUTE_ADMINHELP))
+ if(src.handle_spam_prevention(msg,MUTE_ADMINHELP))
return
- //clean the message if it's not sent by a high-rank admin
- if(!check_rights(R_SERVER|R_DEBUG,0)||external)//no sending html to the poor bots
- msg = sanitize(copytext_char(msg, 1, MAX_MESSAGE_LEN))
- if(!msg)
- return
-
var/rawmsg = msg
if(holder)