mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-25 22:19:30 +01:00
And a silent conflict to boot...
This commit is contained in:
@@ -25,19 +25,6 @@
|
||||
* Text sanitization
|
||||
*/
|
||||
|
||||
//this proc strips html properly, but it's not lazy like the other procs.
|
||||
//this means that it doesn't just remove < and > and call it a day. seriously, who the fuck thought that would be useful.
|
||||
/proc/strip_html_properly(var/input)
|
||||
var/opentag = 1 //These store the position of < and > respectively.
|
||||
var/closetag = 1
|
||||
while(1)
|
||||
opentag = findtext(input, "<")
|
||||
closetag = findtext(input, ">")
|
||||
if(!closetag || !opentag)
|
||||
break
|
||||
input = copytext(input, 1, opentag) + copytext(input, (closetag + 1))
|
||||
return input
|
||||
|
||||
//Simply removes < and > and limits the length of the message
|
||||
/proc/strip_html_simple(var/t,var/limit=MAX_MESSAGE_LEN)
|
||||
var/list/strip_chars = list("<",">")
|
||||
|
||||
Reference in New Issue
Block a user