mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-13 08:03:43 +01:00
Don't html-ize high rank admins in Discord. (#25117)
* More escaping fixes. * Update code/__HELPERS/text.dm Co-authored-by: GDN <96800819+GDNgit@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: DGamerL <108773801+DGamerL@users.noreply.github.com> Signed-off-by: Charlie Nolan <funnyman3595@gmail.com> --------- Signed-off-by: Charlie Nolan <funnyman3595@gmail.com> Co-authored-by: FunnyMan3595 (Charlie Nolan) <funnyman@google.com> Co-authored-by: GDN <96800819+GDNgit@users.noreply.github.com> Co-authored-by: DGamerL <108773801+DGamerL@users.noreply.github.com>
This commit is contained in:
@@ -174,16 +174,16 @@
|
||||
/mob/proc/hear_sleep(message)
|
||||
var/heard = ""
|
||||
if(prob(15))
|
||||
message = strip_html_properly(message)
|
||||
message = html_decode(strip_html_tags(message))
|
||||
var/list/punctuation = list(",", "!", ".", ";", "?")
|
||||
var/list/messages = splittext(message, " ")
|
||||
if(length(messages) > 0)
|
||||
var/R = rand(1, length(messages))
|
||||
var/heardword = messages[R]
|
||||
if(copytext(heardword,1, 1) in punctuation)
|
||||
heardword = copytext(heardword,2)
|
||||
heardword = html_encode(copytext(heardword, 2))
|
||||
if(copytext(heardword,-1) in punctuation)
|
||||
heardword = copytext(heardword,1,length(heardword))
|
||||
heardword = html_encode(copytext(heardword, 1, length(heardword)))
|
||||
heard = "<span class='game say'>...<i>You hear something about<i>... '[heardword]'...</span>"
|
||||
else
|
||||
heard = "<span class='game say'>...<i>You almost hear something...</i>...</span>"
|
||||
|
||||
@@ -311,7 +311,7 @@ GLOBAL_LIST_EMPTY(channel_to_radio_key)
|
||||
return name
|
||||
|
||||
/mob/living/whisper(message as text)
|
||||
message = trim_strip_html_properly(message)
|
||||
message = trim_strip_html_tags(message)
|
||||
|
||||
//parse the language code and consume it
|
||||
var/list/message_pieces = parse_languages(message)
|
||||
|
||||
Reference in New Issue
Block a user