Merge pull request #11434 from Citadel-Station-13/Ghommie-patch-3

Fixes flavor text preview on the chatbox.
This commit is contained in:
kevinz000
2020-03-11 17:44:35 -07:00
committed by GitHub
+2 -2
View File
@@ -60,9 +60,9 @@ GLOBAL_LIST_EMPTY(mobs_with_editable_flavor_text) //et tu, hacky code
return
var/msg = replacetext(text, "\n", " ")
if(length_char(msg) <= 40)
examine_list += "<span class='notice'>[html_encode(msg)]</span>"
examine_list += "<span class='notice'>[msg]</span>"
else
examine_list += "<span class='notice'>[html_encode(copytext_char(msg, 1, 37))]... <a href='?src=[REF(src)];show_flavor=[REF(target)]'>More...</span></a>"
examine_list += "<span class='notice'>[copytext_char(msg, 1, 37)]... <a href='?src=[REF(src)];show_flavor=[REF(target)]'>More...</span></a>"
/datum/element/flavor_text/Topic(href, href_list)
. = ..()