From 9f9c1b4f8fdef524f877f2c149e0eef95d70ec9a Mon Sep 17 00:00:00 2001 From: Kyle Spier-Swenson Date: Wed, 29 Jun 2016 04:39:46 -0700 Subject: [PATCH] VV now escapes name (because name could be an item in a list) --- code/datums/datumvars.dm | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/code/datums/datumvars.dm b/code/datums/datumvars.dm index f0da4d0a1e3..1d2bf99a418 100644 --- a/code/datums/datumvars.dm +++ b/code/datums/datumvars.dm @@ -354,10 +354,10 @@ body html += "
  • " if (isnull(value)) - html += "[name] = null" + html += "[html_encode(name)] = null" else if (istext(value)) - html += "[name] = \"[html_encode(value)]\"" + html += "[html_encode(name)] = \"[html_encode(value)]\"" else if (isicon(value)) #ifdef VARSICON @@ -365,9 +365,9 @@ body var/rnd = rand(1,10000) var/rname = "tmp\ref[I][rnd].png" usr << browse_rsc(I, rname) - html += "[name] = ([value]) " + html += "[html_encode(name)] = ([value]) " #else - html += "[name] = /icon ([value])" + html += "[html_encode(name)] = /icon ([value])" #endif /* else if (istype(value, /image)) @@ -382,19 +382,19 @@ body #endif */ else if (isfile(value)) - html += "[name] = '[value]'" + html += "[html_encode(name)] = '[value]'" else if (istype(value, /datum)) var/datum/D = value - html += "[name] \ref[value] = [D.type]" + html += "[html_encode(name)] \ref[value] = [D.type]" else if (istype(value, /client)) var/client/C = value - html += "[name] \ref[value] = [C] [C.type]" + html += "[html_encode(name)] \ref[value] = [C] [C.type]" // else if (istype(value, /list)) var/list/L = value - html += "[name] = /list ([L.len])" + html += "[html_encode(name)] = /list ([L.len])" if (L.len > 0 && !(name == "underlays" || name == "overlays" || name == "vars" || L.len > 500)) // not sure if this is completely right... @@ -414,7 +414,7 @@ body html += "" else - html += "[name] = [html_encode(value)]" + html += "[html_encode(name)] = [html_encode(value)]" html += "
  • "