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:
Charlie Nolan
2024-05-05 20:19:14 -07:00
committed by GitHub
parent 819e9ed064
commit a5d780e4d7
12 changed files with 29 additions and 52 deletions
+3 -3
View File
@@ -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>"
+1 -1
View File
@@ -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)