Fixes Exploitable Formatting (#21281)

* Fixed exploitables not formatting correctly.

Before:
<img width="400" height="400" alt="image"
src="https://github.com/user-attachments/assets/91546d9a-2dde-483e-a144-e6b3ca691c2f"
/>

After:
<img width="720" height="573" alt="image"
src="https://github.com/user-attachments/assets/676b4154-d0fa-4a9f-8cf7-7583c1d5aef4"
/>
This commit is contained in:
Geeves
2025-09-04 17:50:01 +00:00
committed by GitHub
parent 14805f85dc
commit 9ca3144086
3 changed files with 15 additions and 5 deletions
+1 -2
View File
@@ -206,8 +206,7 @@ Then check if it's true, if true return. This will stop the normal menu appearin
tgui_data["exploit"] = list() // Setting this to equal L.fields passes it's variables that are lists as reference instead of value.
// We trade off being able to automatically add shit for more control over what gets passed to json
// and if it's sanitized for html.
tgui_data["exploit"]["tgui_exploit_record"] = html_encode(L.exploit_record) // Change stuff into html
tgui_data["exploit"]["tgui_exploit_record"] = replacetext(tgui_data["exploit"]["tgui_exploit_record"], "\n", "<br>") // change line breaks into <br>
tgui_data["exploit"]["tgui_exploit_record"] = html_decode(L.exploit_record) // this user input is already sanitized and encoded when saved to the DB, we can just decode it and slap it into a span
tgui_data["exploit"]["name"] = html_encode(L.name)
tgui_data["exploit"]["sex"] = html_encode(L.sex)
tgui_data["exploit"]["age"] = html_encode(L.age)