mt-mods / display_modpack

Display modpack for Minetest, provides mods with dynamic display and font display: clocks, signs, and more. (Maintained fork)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

signs eat backslashes

Niklp09 opened this issue · comments

write a sign containing "\", it's displayed properly, but when you edit it again, formspec treating them as escapes and they disappear

yl issue: https://gitea.your-land.de/your-land/bugtracker/issues/5016

Looks like it's missing a minetest.formspec_escape(), which is bad 👀

meta:set_string("display_text", text)
fs = "textarea[0.5,0.7;5.5,2;display_text;"..F("Text")..""..
extralabel..";${display_text}]"

Only problem is you can't just escape the text before saving it in display_text, because that string is also used for creating the entities, so you would see the escapes.