From af48da3d64b3c4d6cc64c6b08fa844b6fcf902ef Mon Sep 17 00:00:00 2001
From: Dan Hemberger
Date: Sun, 10 Mar 2019 13:27:45 -0700
Subject: [PATCH 1/5] Make sure & is encoded in displayed VoteSite URLs
If the `&` characters in the voting site URLs are not encoded, then
`DOMDocument::loadHTML` will output a htmlParseEntityRef warning due
to a missing `;`, since this is how entities are encoded in HTML
(e.g. `&`). Use `htmlspecialchars` to make the sure `&` characters
are properly encoded.
We currently suppress this error message in the Template class, but
this brings us one step closer to not needing to suppress it.
---
templates/Default/engine/Default/includes/VoteLinks.inc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/templates/Default/engine/Default/includes/VoteLinks.inc b/templates/Default/engine/Default/includes/VoteLinks.inc
index 0fc1d08e1..78a48aa96 100644
--- a/templates/Default/engine/Default/includes/VoteLinks.inc
+++ b/templates/Default/engine/Default/includes/VoteLinks.inc
@@ -4,7 +4,7 @@ if (SmrSession::hasGame()) { ?>
} ?>
- ' target="_blank">
+ ' target="_blank">
From fb1aea407b7570bd1c21e60a5016a6e88903259f Mon Sep 17 00:00:00 2001
From: Dan Hemberger
Date: Tue, 12 Mar 2019 13:42:28 -0700
Subject: [PATCH 2/5] Remove #InputFieldsText CSS
The CSS for this `id` is not needed and should be removed.
---
engine/Default/bar_read_wall.php | 2 +-
htdocs/css/Default.css | 3 ---
htdocs/css/Default/Default.css | 5 -----
htdocs/css/Freon22/ClassicGreen.css | 5 -----
4 files changed, 1 insertion(+), 14 deletions(-)
diff --git a/engine/Default/bar_read_wall.php b/engine/Default/bar_read_wall.php
index 1cd36ac84..29dff5249 100644
--- a/engine/Default/bar_read_wall.php
+++ b/engine/Default/bar_read_wall.php
@@ -39,6 +39,6 @@
$PHP_OUTPUT.=(' ');
$PHP_OUTPUT.=create_echo_form(create_container('skeleton.php', 'bar_read_wall.php'));
-$PHP_OUTPUT.=(' ');
+$PHP_OUTPUT.=(' ');
$PHP_OUTPUT.=create_submit('Write it');
$PHP_OUTPUT.=('');
diff --git a/htdocs/css/Default.css b/htdocs/css/Default.css
index 67e84e6d0..4442ede82 100644
--- a/htdocs/css/Default.css
+++ b/htdocs/css/Default.css
@@ -51,9 +51,6 @@ h3 {
padding: 0px 8px;
display: inline-table; /* Fixes the problems with vertical overlap in FF, but not IE :( */
}
-#InputFieldsText {
- font: inherit;
-}
/* ------------------------------------ */
#help_content {
margin: 10px 20px 50px 20px;
diff --git a/htdocs/css/Default/Default.css b/htdocs/css/Default/Default.css
index 8638449da..136a28ffc 100644
--- a/htdocs/css/Default/Default.css
+++ b/htdocs/css/Default/Default.css
@@ -35,11 +35,6 @@ h1, h2 {
color: #FFFFFF;
border: 1px solid #80C870;
}
-#InputFieldsText {
- background: #06240E;
- color: #FFFFFF;
- border: 1px solid #80C870;
-}
a.scan_btn {
background: #060E88;
color: #BBBBBB;
diff --git a/htdocs/css/Freon22/ClassicGreen.css b/htdocs/css/Freon22/ClassicGreen.css
index f8089ada0..f459e2458 100644
--- a/htdocs/css/Freon22/ClassicGreen.css
+++ b/htdocs/css/Freon22/ClassicGreen.css
@@ -35,11 +35,6 @@ h1, h2 {
color: #FFFFFF;
border: 1px solid #80C870;
}
-#InputFieldsText {
- background: #06240E;
- color: #FFFFFF;
- border: 1px solid #80C870;
-}
a.scan_btn {
background: #060E88;
color: #BBBBBB;
From 123173f64cffb388a63037b536dce211c81ac792 Mon Sep 17 00:00:00 2001
From: Dan Hemberger
Date: Tue, 12 Mar 2019 13:43:49 -0700
Subject: [PATCH 3/5] Do not use InputFields as an HTML element id
We should only use `InputFields` as an element `class`, and never
an `id`. The reason is because the `id` must be unique on a page,
and the CSS for `InputFields` is intended to style all input
elements.
This fixes the `DOMDocument::loadHTML` warning:
> ID InputFields already defined
It also fixes a similar warning in HTML validators.
---
admin/Default/game_delete.php | 2 +-
engine/Default/galactic_post_application.php | 4 +--
engine/Default/galactic_post_make_paper.php | 2 +-
htdocs/album/index.php | 4 +--
htdocs/css/Default.css | 2 +-
htdocs/login_create.php | 12 ++++----
htdocs/resend_password.php | 4 +--
htdocs/reset_password.php | 10 +++----
lib/Album/album_functions.php | 8 ++---
lib/Default/smr.inc | 2 +-
.../Default/admin/Default/1.6/GameDetails.inc | 6 ++--
.../Default/1.6/universe_create_galaxies.php | 2 +-
.../Default/admin/Default/account_edit.php | 30 +++++++++----------
.../admin/Default/admin_message_send.php | 12 ++++----
.../Default/admin/Default/album_moderate.php | 2 +-
.../admin/Default/announcement_create.php | 4 +--
templates/Default/admin/Default/box_reply.php | 4 +--
templates/Default/admin/Default/box_view.php | 4 +--
templates/Default/admin/Default/changelog.php | 6 ++--
.../Default/admin/Default/game_status.php | 2 +-
templates/Default/admin/Default/ip_view.php | 6 ++--
.../Default/admin/Default/ip_view_results.php | 4 +--
.../Default/admin/Default/log_console.php | 4 +--
.../admin/Default/log_console_detail.php | 2 +-
.../admin/Default/manage_draft_leaders.php | 2 +-
.../admin/Default/manage_post_editors.php | 2 +-
.../Default/admin/Default/newsletter_send.php | 6 ++--
.../Default/admin/Default/notify_reply.php | 8 ++---
.../Default/admin/Default/vote_create.php | 6 ++--
.../Default/album_delete_confirmation.php | 4 +--
.../Default/engine/Default/album_edit.php | 18 +++++------
.../engine/Default/alliance_invite_player.php | 4 +--
.../engine/Default/alliance_leadership.php | 4 +--
.../engine/Default/alliance_message.php | 4 +--
.../engine/Default/alliance_message_view.php | 2 +-
.../engine/Default/alliance_roster.php | 2 +-
.../engine/Default/alliance_set_op.php | 4 +--
.../engine/Default/alliance_treaties.php | 2 +-
.../Default/engine/Default/bar_galmap_buy.php | 4 +--
.../engine/Default/bar_gambling_bet.php | 4 +--
.../engine/Default/bar_talk_bartender.php | 2 +-
.../Default/engine/Default/bounty_place.php | 6 ++--
.../Default/engine/Default/bug_report.php | 10 +++----
.../Default/engine/Default/buy_ship_name.php | 12 ++++----
.../Default/engine/Default/cargo_dump.php | 4 +--
.../Default/engine/Default/chat_sharing.php | 8 ++---
.../engine/Default/configure_hardware.php | 6 ++--
templates/Default/engine/Default/contact.php | 6 ++--
.../engine/Default/council_embassy.php | 4 +--
.../engine/Default/council_send_message.php | 2 +-
.../Default/engine/Default/council_vote.php | 10 +++----
.../Default/engine/Default/course_plot.php | 4 +--
.../engine/Default/feature_request.php | 6 ++--
.../Default/feature_request_comments.php | 6 ++--
.../Default/engine/Default/forces_drop.php | 12 ++++----
.../engine/Default/galactic_post_past.php | 2 +-
.../Default/galactic_post_write_article.php | 8 ++---
.../Default/engine/Default/game_join.php | 2 +-
.../engine/Default/history_games_news.php | 2 +-
.../Default/includes/AllianceRankings.inc | 4 +--
.../Default/includes/CommonMessageSend.inc | 6 ++--
.../Default/includes/PlayerRankings.inc | 4 +--
.../Default/engine/Default/leave_newbie.php | 4 +--
.../Default/engine/Default/message_view.php | 6 ++--
.../Default/engine/Default/news_read.php | 4 +--
.../engine/Default/news_read_advanced.php | 6 ++--
.../Default/engine/Default/planet_defense.php | 12 ++++----
.../engine/Default/planet_financial.php | 6 ++--
.../Default/engine/Default/planet_main.php | 2 +-
.../engine/Default/planet_ownership.php | 14 ++++-----
.../engine/Default/planet_stockpile.php | 6 ++--
.../Default/engine/Default/port_loot.php | 4 +--
.../Default/rankings_alliance_vs_alliance.php | 4 +--
.../engine/Default/rankings_sector_kill.php | 4 +--
.../engine/Default/sector_jump_calculate.php | 2 +-
.../Default/engine/Default/shop_goods.php | 12 ++++----
.../engine/Default/shop_goods_trade.php | 4 +--
.../Default/engine/Default/shop_hardware.php | 6 ++--
.../Default/engine/Default/trader_search.php | 4 +--
templates/Default/socialRegister.inc | 18 +++++------
80 files changed, 229 insertions(+), 229 deletions(-)
diff --git a/admin/Default/game_delete.php b/admin/Default/game_delete.php
index 364948af3..3335dadd5 100644
--- a/admin/Default/game_delete.php
+++ b/admin/Default/game_delete.php
@@ -9,7 +9,7 @@
$container['body'] = 'game_delete_confirm.php';
$PHP_OUTPUT.=create_echo_form($container);
-$PHP_OUTPUT.=('');
+$PHP_OUTPUT.=('');
$PHP_OUTPUT.=('[Select the game] ');
$db->query('SELECT * FROM game');
diff --git a/engine/Default/galactic_post_application.php b/engine/Default/galactic_post_application.php
index 66f18244d..aaf8b8090 100644
--- a/engine/Default/galactic_post_application.php
+++ b/engine/Default/galactic_post_application.php
@@ -11,10 +11,10 @@
$PHP_OUTPUT.=('No : ');
$PHP_OUTPUT.=(' ');
$PHP_OUTPUT.=('How many articles would you write per week if you were selected? ');
-$PHP_OUTPUT.=(' ');
+$PHP_OUTPUT.=(' ');
$PHP_OUTPUT.=(' ');
$PHP_OUTPUT.=('In 255 characters or less please describe why you should be accepted ');
-$PHP_OUTPUT.=('');
+$PHP_OUTPUT.=('');
$PHP_OUTPUT.=(' ');
$PHP_OUTPUT.=create_submit('Apply');
$PHP_OUTPUT.=('');
diff --git a/engine/Default/galactic_post_make_paper.php b/engine/Default/galactic_post_make_paper.php
index 72ed0688b..889fb46fe 100644
--- a/engine/Default/galactic_post_make_paper.php
+++ b/engine/Default/galactic_post_make_paper.php
@@ -7,6 +7,6 @@
$container = array();
$container['url'] = 'galactic_post_make_paper_processing.php';
$PHP_OUTPUT.=create_echo_form($container);
-$PHP_OUTPUT.=(' ');
+$PHP_OUTPUT.=(' ');
$PHP_OUTPUT.=create_submit('Make the paper');
$PHP_OUTPUT.=('');
diff --git a/htdocs/album/index.php b/htdocs/album/index.php
index 518c7ce70..9a163ddc2 100644
--- a/htdocs/album/index.php
+++ b/htdocs/album/index.php
@@ -116,8 +116,8 @@
diff --git a/htdocs/css/Default.css b/htdocs/css/Default.css
index 4442ede82..a8bd56d75 100644
--- a/htdocs/css/Default.css
+++ b/htdocs/css/Default.css
@@ -27,7 +27,7 @@ h3 {
}
/* ----- End Heading styles ----- */
/* ---------------------------- */
-#InputFields, .InputFields {
+.InputFields {
font: inherit;
}
.submitStyle:link {
diff --git a/htdocs/login_create.php b/htdocs/login_create.php
index b69922d67..8c960c378 100644
--- a/htdocs/login_create.php
+++ b/htdocs/login_create.php
@@ -40,24 +40,24 @@
User name:
-
+
Password:
-
+
Verify Password:
-
+
E-Mail Address:
-
+
Local Time:
-
Referral ID (Optional):
- >
+ >
diff --git a/htdocs/resend_password.php b/htdocs/resend_password.php
index 62ce7bb97..dfd830409 100644
--- a/htdocs/resend_password.php
+++ b/htdocs/resend_password.php
@@ -34,10 +34,10 @@
-
+
diff --git a/htdocs/reset_password.php b/htdocs/reset_password.php
index 37bfea414..c355e1b40 100644
--- a/htdocs/reset_password.php
+++ b/htdocs/reset_password.php
@@ -33,22 +33,22 @@
-
+
diff --git a/lib/Album/album_functions.php b/lib/Album/album_functions.php
index 5af988019..2468a3210 100644
--- a/lib/Album/album_functions.php
+++ b/lib/Album/album_functions.php
@@ -202,15 +202,15 @@ function album_entry($album_id) {
echo(' ');
echo('');
diff --git a/lib/Default/smr.inc b/lib/Default/smr.inc
index 3877e3cad..2da2e4042 100644
--- a/lib/Default/smr.inc
+++ b/lib/Default/smr.inc
@@ -232,7 +232,7 @@ function create_form($container,$actions) {
}
function create_submit($value) {
- return (' ');
+ return (' ');
}
function create_error($message) {
diff --git a/templates/Default/admin/Default/1.6/GameDetails.inc b/templates/Default/admin/Default/1.6/GameDetails.inc
index 39eca8c1c..fcd13f2e3 100644
--- a/templates/Default/admin/Default/1.6/GameDetails.inc
+++ b/templates/Default/admin/Default/1.6/GameDetails.inc
@@ -42,7 +42,7 @@
Game Type
- $GameType) {
?>>
@@ -64,8 +64,8 @@
Ignore Stats
- Yes: />
- No: />
+ Yes: />
+ No: />
diff --git a/templates/Default/admin/Default/1.6/universe_create_galaxies.php b/templates/Default/admin/Default/1.6/universe_create_galaxies.php
index ce344e8c1..2a3bafb14 100644
--- a/templates/Default/admin/Default/1.6/universe_create_galaxies.php
+++ b/templates/Default/admin/Default/1.6/universe_create_galaxies.php
@@ -23,7 +23,7 @@
- " class="InputFields">
diff --git a/templates/Default/admin/Default/account_edit.php b/templates/Default/admin/Default/account_edit.php
index c34729ce5..c1bdc929c 100644
--- a/templates/Default/admin/Default/account_edit.php
+++ b/templates/Default/admin/Default/account_edit.php
@@ -8,7 +8,7 @@
echo $EditingAccount->getAccountID();
}
else { ?>
-
@@ -19,7 +19,7 @@
echo $EditingAccount->getLogin();
}
else { ?>
-
@@ -30,7 +30,7 @@
echo $EditingAccount->getValidationCode();
}
else { ?>
-
@@ -41,7 +41,7 @@
echo $EditingAccount->getEmail();
}
else { ?>
-
@@ -52,7 +52,7 @@
echo $EditingAccount->getHofName();
}
else { ?>
-
Donation:
- $
+ $
@@ -138,7 +138,7 @@
Grant Reward SMR Credits:
- Credits
+ Credits
@@ -169,7 +169,7 @@
- Note (optional):
+ Note (optional):
@@ -207,11 +207,11 @@ function go() {
- New Reason:
+ New Reason:
Reopen! (Will remove ban points, if specified)
- Suspicion:
- Ban Points: points
+ Suspicion:
+ Ban Points: points
@@ -329,12 +329,12 @@ function go() {
else { ?>
Player Name:
-
+
Game:
-
+
All Games getDisplayName(); ?>
-
-
From: Administrator
To:
-
+
[Please Select] ()
-
- Hours Till Expire: (0 = never expire)
+
+ Hours Till Expire: (0 = never expire)
-
+
diff --git a/templates/Default/admin/Default/album_moderate.php b/templates/Default/admin/Default/album_moderate.php
index c894abc6d..a85852360 100644
--- a/templates/Default/admin/Default/album_moderate.php
+++ b/templates/Default/admin/Default/album_moderate.php
@@ -40,7 +40,7 @@
You can edit the text that will be sent
to that user as an email if you reset his picture!
-
+
diff --git a/templates/Default/admin/Default/announcement_create.php b/templates/Default/admin/Default/announcement_create.php
index 15804abd8..d18a3ee7f 100644
--- a/templates/Default/admin/Default/announcement_create.php
+++ b/templates/Default/admin/Default/announcement_create.php
@@ -1,6 +1,6 @@
Announcements are displayed to all users the next time they log in.
diff --git a/templates/Default/admin/Default/box_reply.php b/templates/Default/admin/Default/box_reply.php
index a3dffc7a9..5b818239d 100644
--- a/templates/Default/admin/Default/box_reply.php
+++ b/templates/Default/admin/Default/box_reply.php
@@ -3,8 +3,8 @@
From: Administrator
To: getPlayerName(); ?> a.k.a getLogin(); ?>
-
+
Add Ban Points
Sending the message will add ban points, if specified above.
-
+
diff --git a/templates/Default/admin/Default/box_view.php b/templates/Default/admin/Default/box_view.php
index 0b553f1cf..ed26394e2 100644
--- a/templates/Default/admin/Default/box_view.php
+++ b/templates/Default/admin/Default/box_view.php
@@ -17,9 +17,9 @@
Back
-
+
-
+
Marked Messages
All Messages
diff --git a/templates/Default/admin/Default/changelog.php b/templates/Default/admin/Default/changelog.php
index f6d187fed..fe24643ad 100644
--- a/templates/Default/admin/Default/changelog.php
+++ b/templates/Default/admin/Default/changelog.php
@@ -14,15 +14,15 @@
Title:
-
+
Message:
Affected Database:
-
-
+
+
diff --git a/templates/Default/admin/Default/game_status.php b/templates/Default/admin/Default/game_status.php
index 60b94d44f..0271979e7 100644
--- a/templates/Default/admin/Default/game_status.php
+++ b/templates/Default/admin/Default/game_status.php
@@ -2,7 +2,7 @@
If you wish to close Space Merchant Realms, please enter a reason for the closure.
-
+
NOTE: Closing the server will kick all players and disable general logins.
Only admins with permission to reopen the game will be allowed to log in while closed.
Please select the type of IP search you would like.
-
+
List all IPs
Search for a specific IP
List all IPs for a specific account (id)
@@ -54,9 +54,9 @@ function go() {
Wildcard Host Search
Computer Sharing
-
+
-
+