Merge pull request #11652 from Ghommie/Ghommie-cit650

Ports "Makes raw HTML and browser datum popups UTF-8 aware"
This commit is contained in:
kevinz000
2020-03-28 16:00:48 -07:00
committed by GitHub
36 changed files with 77 additions and 50 deletions
+2 -1
View File
@@ -13,7 +13,8 @@
/obj/item/areaeditor/attack_self(mob/user)
add_fingerprint(user)
. = "<BODY><HTML><head><title>[src]</title></head> \
. = "<BODY><HTML><head><meta http-equiv='Content-Type' content='text/html; charset=UTF-8'>\
<title>[src]</title></head> \
<h2>[station_name()] [src.name]</h2> \
<small>[fluffnotice]</small><hr>"
switch(get_area_type())
+2 -2
View File
@@ -271,7 +271,7 @@ GLOBAL_LIST_EMPTY(PDAs)
user.set_machine(src)
var/dat = "<!DOCTYPE html><html><head><title>Personal Data Assistant</title><link href=\"https://fonts.googleapis.com/css?family=Orbitron|Share+Tech+Mono|VT323\" rel=\"stylesheet\"></head><body bgcolor=\"" + background_color + "\"><style>body{" + font_mode + "}ul,ol{list-style-type: none;}a, a:link, a:visited, a:active, a:hover { color: #000000;text-decoration:none; }img {border-style:none;}a img{padding-right: 9px;}</style>"
var/dat = "<!DOCTYPE html><html><head><meta http-equiv='Content-Type' content='text/html; charset=UTF-8'><title>Personal Data Assistant</title><link href=\"https://fonts.googleapis.com/css?family=Orbitron|Share+Tech+Mono|VT323\" rel=\"stylesheet\"></head><body bgcolor=\"" + background_color + "\"><style>body{" + font_mode + "}ul,ol{list-style-type: none;}a, a:link, a:visited, a:active, a:hover { color: #000000;text-decoration:none; }img {border-style:none;}a img{padding-right: 9px;}</style>"
dat += assets.css_tag()
dat += emoji_s.css_tag()
@@ -1192,7 +1192,7 @@ GLOBAL_LIST_EMPTY(PDAs)
if(incapacitated())
return
if(!isnull(aiPDA))
var/HTML = "<html><head><title>AI PDA Message Log</title></head><body>[aiPDA.tnote]</body></html>"
var/HTML = "<html><head><meta http-equiv='Content-Type' content='text/html; charset=UTF-8'><title>AI PDA Message Log</title></head><body>[aiPDA.tnote]</body></html>"
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.")
+10
View File
@@ -14,6 +14,7 @@
//book contents below
dat = {"<html>
<head>
<meta http-equiv='Content-Type' content='text/html; charset=UTF-8'>
<style>
h1 {font-size: 18px; margin: 15px 0px 5px;}
h2 {font-size: 15px; margin: 15px 0px 5px;}
@@ -49,6 +50,7 @@
title = "APLU \"Ripley\" Construction and Operation Manual"
dat = {"<html>
<head>
<meta http-equiv='Content-Type' content='text/html; charset=UTF-8'>
<style>
h1 {font-size: 18px; margin: 15px 0px 5px;}
h2 {font-size: 15px; margin: 15px 0px 5px;}
@@ -122,6 +124,7 @@
title = "Chef Recipes"
dat = {"<html>
<head>
<meta http-equiv='Content-Type' content='text/html; charset=UTF-8'>
<style>
h1 {font-size: 18px; margin: 15px 0px 5px;}
h2 {font-size: 15px; margin: 15px 0px 5px;}
@@ -202,6 +205,10 @@
author = "Syndicate"
title = "Fission Mailed: Nuclear Sabotage 101"
dat = {"<html>
<head>
<meta http-equiv='Content-Type' content='text/html; charset=UTF-8'>
</head>
<body>
Nuclear Explosives 101:<br>
Hello and thank you for choosing the Syndicate for your nuclear information needs.<br>
Today's crash course will deal with the operation of a Fusion Class Nanotrasen made Nuclear Device.<br>
@@ -229,6 +236,7 @@
<b>Disk, Code, Safety, Timer, Disk, RUN!</b><br>
Intelligence Analysts believe that normal Nanotrasen procedure is for the Captain to secure the nuclear authorisation disk.<br>
Good luck!
</body>
</html>"}
// Wiki books that are linked to the configured wiki link.
@@ -249,6 +257,7 @@
dat = {"
<html><head>
<meta http-equiv='Content-Type' content='text/html; charset=UTF-8'>
<style>
iframe {
display: none;
@@ -284,6 +293,7 @@
dat = {"
<html><head>
<meta http-equiv='Content-Type' content='text/html; charset=UTF-8'>
<style>
iframe {
display: none;
+1 -1
View File
@@ -52,7 +52,7 @@ GLOBAL_LIST_INIT(bibleitemstates, list("bible", "koran", "scrapbook", "bible",
return
// If H is the Chaplain, we can set the icon_state of the bible (but only once!)
if(!GLOB.bible_icon_state && H.job == "Chaplain")
var/dat = "<html><head><title>Pick Bible Style</title></head><body><center><h2>Pick a bible style</h2></center><table>"
var/dat = "<html><head><meta http-equiv='Content-Type' content='text/html; charset=UTF-8'><title>Pick Bible Style</title></head><body><center><h2>Pick a bible style</h2></center><table>"
for(var/i in 1 to GLOB.biblestates.len)
var/icon/bibleicon = icon('icons/obj/storage.dmi', GLOB.biblestates[i])
var/nicename = GLOB.biblenames[i]
+1 -1
View File
@@ -89,7 +89,7 @@ FLOOR SAFES
var/obj/item/P = contents[i]
dat += "<tr><td><a href='?src=[REF(src)];retrieve=[REF(P)]'>[P.name]</a></td></tr>"
dat += "</table></center>"
user << browse("<html><head><title>[name]</title></head><body>[dat]</body></html>", "window=safe;size=350x300")
user << browse("<html><head><meta http-equiv='Content-Type' content='text/html; charset=UTF-8'><title>[name]</title></head><body>[dat]</body></html>", "window=safe;size=350x300")
/obj/structure/safe/Topic(href, href_list)
if(!ishuman(usr))