Merge pull request #27089 from Exxion/'

Fixes extra html_encode() in pray and rambler vows
This commit is contained in:
DamianX
2020-07-13 20:50:39 +02:00
committed by GitHub
3 changed files with 5 additions and 8 deletions

View File

@@ -39,10 +39,7 @@
var/list/strip_chars = list("<",">")
t = copytext(t, 1, limit)
for(var/char in strip_chars)
var/index = findtext(t, char)
while(index)
t = copytext(t, 1, index) + copytext(t, index+1)
index = findtext(t, char)
t = replacetext(t, char, "")
return t
/proc/strip_html_properly(input = "")

View File

@@ -153,7 +153,7 @@
if(!target.mind)
to_chat(user,"<span class='warning'>[target] has no mind!</span>")
continue
var/vow = copytext(sanitize(input(user, "Enter your vow. You have [R.remaining_vows] left.", "VOW LOCK IN") as null|text),1,MAX_MESSAGE_LEN)
var/vow = stripped_input(user, "Enter your vow. You have [R.remaining_vows] left.", "VOW LOCK IN")
if(vow)
user.say("[target], I vow [vow].")
user.say("VOW LOCKED IN!")

View File

@@ -7,7 +7,7 @@
to_chat(usr, "<span class='warning'>Speech is currently admin-disabled.</span>")
return
msg = copytext(sanitize(msg), 1, MAX_MESSAGE_LEN)
msg = strip_html_simple(msg)
if(!msg)
return