mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 10:21:11 +00:00
Fix double-encoding deadchat
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
/mob/dead/observer/say(var/message)
|
/mob/dead/observer/say(var/message)
|
||||||
message = trim(copytext(sanitize(message), 1, MAX_MESSAGE_LEN))
|
message = trim(copytext(message, 1, MAX_MESSAGE_LEN))
|
||||||
|
|
||||||
if (!message)
|
if (!message)
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -113,7 +113,7 @@ var/list/department_radio_keys = list(
|
|||||||
/mob/living/say(var/message, bubble_type)
|
/mob/living/say(var/message, bubble_type)
|
||||||
say_testing(src, "/mob/living/say(\"[message]\", [bubble_type]")
|
say_testing(src, "/mob/living/say(\"[message]\", [bubble_type]")
|
||||||
if(timestopped) return //under the effects of time magick
|
if(timestopped) return //under the effects of time magick
|
||||||
message = trim(copytext(sanitize(message), 1, MAX_MESSAGE_LEN))
|
message = trim(copytext(message, 1, MAX_MESSAGE_LEN))
|
||||||
message = capitalize(message)
|
message = capitalize(message)
|
||||||
|
|
||||||
say_testing(src, "Say start, message=[message]")
|
say_testing(src, "Say start, message=[message]")
|
||||||
|
|||||||
@@ -155,7 +155,7 @@ var/global/borer_unlock_types = typesof(/datum/unlockable/borer) - /datum/unlock
|
|||||||
|
|
||||||
|
|
||||||
/mob/living/simple_animal/borer/say(var/message)
|
/mob/living/simple_animal/borer/say(var/message)
|
||||||
message = trim(copytext(sanitize(message), 1, MAX_MESSAGE_LEN))
|
message = trim(copytext(message, 1, MAX_MESSAGE_LEN))
|
||||||
message = capitalize(message)
|
message = capitalize(message)
|
||||||
|
|
||||||
if(!message)
|
if(!message)
|
||||||
@@ -184,8 +184,10 @@ var/global/borer_unlock_types = typesof(/datum/unlockable/borer) - /datum/unlock
|
|||||||
src << "You have no host to speak to."
|
src << "You have no host to speak to."
|
||||||
return //No host, no audible speech.
|
return //No host, no audible speech.
|
||||||
|
|
||||||
src << "You drop words into [host]'s mind: <span class='borer2host'>\"[message]\"</span>"
|
var/encoded_message = html_encode(message)
|
||||||
host << "<span class='borer2host'>\"[message]\"</span>"
|
|
||||||
|
src << "You drop words into [host]'s mind: <span class='borer2host'>\"[encoded_message]\"</span>"
|
||||||
|
host << "<span class='borer2host'>\"[encoded_message]\"</span>"
|
||||||
var/turf/T = get_turf(src)
|
var/turf/T = get_turf(src)
|
||||||
log_say("[truename] [key_name(src)] (@[T.x],[T.y],[T.z]) -> [host]([key_name(host)]) Borer->Host Speech: [message]")
|
log_say("[truename] [key_name(src)] (@[T.x],[T.y],[T.z]) -> [host]([key_name(host)]) Borer->Host Speech: [message]")
|
||||||
|
|
||||||
@@ -196,13 +198,13 @@ var/global/borer_unlock_types = typesof(/datum/unlockable/borer) - /datum/unlock
|
|||||||
var/controls = "<a href='byond://?src=\ref[M];follow2=\ref[M];follow=\ref[src]'>Follow</a>"
|
var/controls = "<a href='byond://?src=\ref[M];follow2=\ref[M];follow=\ref[src]'>Follow</a>"
|
||||||
if(M.client.holder)
|
if(M.client.holder)
|
||||||
controls+= " | <A HREF='?_src_=holder;adminmoreinfo=\ref[src]'>?</A>"
|
controls+= " | <A HREF='?_src_=holder;adminmoreinfo=\ref[src]'>?</A>"
|
||||||
var/rendered="<span class='thoughtspeech'>Thought-speech, <b>[truename]</b> ([controls]) -> <b>[host]:</b> [message]</span>"
|
var/rendered="<span class='thoughtspeech'>Thought-speech, <b>[truename]</b> ([controls]) -> <b>[host]:</b> [encoded_message]</span>"
|
||||||
M.show_message(rendered, 2) //Takes into account blindness and such.
|
M.show_message(rendered, 2) //Takes into account blindness and such.
|
||||||
|
|
||||||
/*
|
/*
|
||||||
for(var/mob/M in mob_list)
|
for(var/mob/M in mob_list)
|
||||||
if(M.mind && (istype(M, /mob/dead/observer)))
|
if(M.mind && (istype(M, /mob/dead/observer)))
|
||||||
M << "<i>Thought-speech, <b>[truename]</b> -> <b>[host]:</b> [copytext(message, 2)]</i>"
|
M << "<i>Thought-speech, <b>[truename]</b> -> <b>[host]:</b> [copytext(html_encode(message), 2)]</i>"
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/mob/living/simple_animal/borer/Stat()
|
/mob/living/simple_animal/borer/Stat()
|
||||||
|
|||||||
Reference in New Issue
Block a user