From 12eecfd18199e554149fb6626cb81cea838b5844 Mon Sep 17 00:00:00 2001 From: MrPerson Date: Sat, 1 Feb 2020 15:14:31 -0600 Subject: [PATCH] Makes raw HTML and browser datum popups UTF-8 aware (#49066) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Makes raw HTML and browser datum popups UTF-8 aware Admin menus specifically really shouldn't break just because you named some guy "☺s the Clown" * Fixed new_player.dm * Fucking filing cabinets --- code/datums/browser.dm | 4 ++-- code/game/gamemodes/dynamic/dynamic.dm | 2 +- .../machinery/telecomms/machines/message_server.dm | 2 +- code/game/mecha/combat/honker.dm | 4 +++- code/game/mecha/equipment/tools/medical_tools.dm | 2 ++ code/game/mecha/mech_fabricator.dm | 5 +++-- code/game/mecha/mecha_control_console.dm | 2 +- code/game/mecha/mecha_topic.dm | 6 +++++- code/game/objects/items/devices/PDA/PDA.dm | 4 ++-- code/game/objects/items/manuals.dm | 12 +++++++++++- code/game/objects/items/storage/book.dm | 2 +- code/game/objects/structures/safe.dm | 2 +- code/modules/admin/admin.dm | 2 +- code/modules/admin/check_antagonists.dm | 2 +- code/modules/admin/outfits.dm | 2 +- code/modules/admin/permissionedit.dm | 4 +++- code/modules/admin/player_panel.dm | 2 +- code/modules/admin/verbs/adminhelp.dm | 4 ++-- code/modules/admin/verbs/beakerpanel.dm | 4 ++-- code/modules/admin/verbs/randomverbs.dm | 4 ++-- code/modules/admin/view_variables/view_variables.dm | 1 + .../antagonists/wizard/equipment/spellbook.dm | 2 +- code/modules/client/verbs/ooc.dm | 2 +- code/modules/mob/dead/new_player/new_player.dm | 2 +- code/modules/mob/dead/new_player/poll.dm | 3 ++- code/modules/mob/living/silicon/pai/software.dm | 1 + code/modules/paperwork/filingcabinet.dm | 2 +- code/modules/photography/photos/photo.dm | 2 +- 28 files changed, 55 insertions(+), 31 deletions(-) diff --git a/code/datums/browser.dm b/code/datums/browser.dm index cbddbf3c82e..61953c23c8b 100644 --- a/code/datums/browser.dm +++ b/code/datums/browser.dm @@ -74,9 +74,9 @@ return {" - - + + [head_content] diff --git a/code/game/gamemodes/dynamic/dynamic.dm b/code/game/gamemodes/dynamic/dynamic.dm index be2addc3829..36f29b5ae8c 100644 --- a/code/game/gamemodes/dynamic/dynamic.dm +++ b/code/game/gamemodes/dynamic/dynamic.dm @@ -119,7 +119,7 @@ GLOBAL_VAR_INIT(dynamic_forced_threat_level, -1) var/antags_rolled = 0 /datum/game_mode/dynamic/admin_panel() - var/list/dat = list("Game Mode Panel

Game Mode Panel

") + var/list/dat = list("Game Mode Panel

Game Mode Panel

") dat += "Dynamic Mode \[VV\]\[Refresh\]
" dat += "Threat Level: [threat_level]
" diff --git a/code/game/machinery/telecomms/machines/message_server.dm b/code/game/machinery/telecomms/machines/message_server.dm index 0d566cfd1a9..694669775be 100644 --- a/code/game/machinery/telecomms/machines/message_server.dm +++ b/code/game/machinery/telecomms/machines/message_server.dm @@ -170,7 +170,7 @@ if(href_list["photo"]) var/mob/M = usr M << browse_rsc(picture.picture_image, "pda_photo.png") - M << browse("PDA Photo" \ + M << browse("PDA Photo" \ + "" \ + "" \ + "", "window=pdaphoto;size=[picture.psize_x]x[picture.psize_y];can-close=true") diff --git a/code/game/mecha/combat/honker.dm b/code/game/mecha/combat/honker.dm index 31743ffaa53..0419cd30df0 100644 --- a/code/game/mecha/combat/honker.dm +++ b/code/game/mecha/combat/honker.dm @@ -42,7 +42,9 @@ /obj/mecha/combat/honker/get_stats_html() var/output = {" - [src.name] data + + + [src.name] data
+ var/dat = {"[src.name]

Tracking beacons data

"} var/list/trackerlist = list() for(var/obj/mecha/MC in GLOB.mechas_list) diff --git a/code/game/mecha/mecha_topic.dm b/code/game/mecha/mecha_topic.dm index e4aa420a802..20627db4607 100644 --- a/code/game/mecha/mecha_topic.dm +++ b/code/game/mecha/mecha_topic.dm @@ -5,7 +5,9 @@ /obj/mecha/proc/get_stats_html() . = {" - [name] data + + + [name] data " + var/dat = "Personal Data Assistant" dat += assets.css_tag() dat += emoji_s.css_tag() @@ -1069,7 +1069,7 @@ GLOBAL_LIST_EMPTY(PDAs) if(incapacitated()) return if(!isnull(aiPDA)) - var/HTML = "AI PDA Message Log[aiPDA.tnote]" + var/HTML = "AI PDA Message Log[aiPDA.tnote]" user << browse(HTML, "window=log;size=400x444;border=1;can_resize=1;can_close=1;can_minimize=0") else to_chat(user, "You do not have a PDA! You should make an issue report about this.") diff --git a/code/game/objects/items/manuals.dm b/code/game/objects/items/manuals.dm index 4825cb3a5ca..3b40e37ca8f 100644 --- a/code/game/objects/items/manuals.dm +++ b/code/game/objects/items/manuals.dm @@ -14,6 +14,7 @@ //book contents below dat = {" +