diff --git a/foundation.gnome.org/vote/include/step3-confirm.php b/foundation.gnome.org/vote/include/step3-confirm.php index 73528c9..dcac8ac 100644 --- a/foundation.gnome.org/vote/include/step3-confirm.php +++ b/foundation.gnome.org/vote/include/step3-confirm.php @@ -8,7 +8,7 @@ function step3_do () { $result = "
".$election["question"]."
\n"; + $result .= "".htmlspecialchars($election["question"])."
\n"; if (count ($votes_array) >= 1) { $result .= "You choose to vote for:
\n"; @@ -18,15 +18,15 @@ function step3_do () { $found = FALSE; foreach ($choices as $choice) { if ($choice["id"] == $vote) { - $result .= "Please write this anonymous token somewhere:
\n"; - $result .= "".$anon_token."
".htmlspecialchars($anon_token)."
This anonymous token will enable you to verify your vote when the preliminary results will be published. Nobody, even the Membership and Elections Committee, except you knows that this token is associated with you and only you will be able to verify your vote. It is not possible to request this anonymous token later.
\n"; return $result; diff --git a/foundation.gnome.org/vote/index.wml b/foundation.gnome.org/vote/index.wml index 9bf1a1e..77ffe8b 100644 --- a/foundation.gnome.org/vote/index.wml +++ b/foundation.gnome.org/vote/index.wml @@ -40,7 +40,7 @@ if (count ($current_elections) > 0) {In the meantime, you can look at the list of all votes and verify that your vote is correct.
\n"; + echo "In the meantime, you can look at the list of all votes and verify that your vote is correct.
\n"; $display = FALSE; } } if ($display) { echo "Please look at the list of all votes and verify that your vote is correct.
\n"; + echo "Please look at the list of all votes and verify that your vote is correct.
\n"; } if (isset ($error) && $error != "") { - echo "If you don't understand the error, you should probably contact the Membership and Elections Committee, which can be reached at elections@gnome.org.
\n"; } diff --git a/foundation.gnome.org/vote/vote.wml b/foundation.gnome.org/vote/vote.wml index 62d37df..ae119a7 100644 --- a/foundation.gnome.org/vote/vote.wml +++ b/foundation.gnome.org/vote/vote.wml @@ -106,6 +106,15 @@ cursor: pointer; @@ -137,9 +146,9 @@ function populateList(){ foreach ($choices as $choice) { $index++; echo " listItem = document.createElement('li');\n"; - echo " listItem.setAttribute('name', 'vote" . $choice["id"] . "');\n"; + echo " listItem.setAttribute('name', 'vote" . escape_js_var($choice["id"]) . "');\n"; echo " listItem.setAttribute('onclick', 'addPreference(this)');\n"; - echo " listItemText = document.createTextNode('" . $choice["choice"] . "');\n"; + echo " listItemText = document.createTextNode('" . escape_js_var($choice["choice"]) . "');\n"; echo " listItem.appendChild(listItemText);\n"; echo " candidateList.appendChild(listItem);\n\n"; @@ -201,7 +210,7 @@ if ($step==2){ if (isset ($election) && $election !== FALSE) { - echo "If you don't understand the error, you should probably contact the Membership and Elections Committee, which can be reached at elections@gnome.org.
\n"; } if ($step != $max_step && $step >= 1) { - echo "\n"; } diff --git a/foundation.gnome.org/vote/votes.wml b/foundation.gnome.org/vote/votes.wml index 5e481f2..60e6376 100644 --- a/foundation.gnome.org/vote/votes.wml +++ b/foundation.gnome.org/vote/votes.wml @@ -41,7 +41,7 @@ if ($display && $election_id >= 0) { } if (isset ($election) && $election !== FALSE) { - echo "Please look at the automatic results to have a summary of the votes. "; - echo "You can also download the ballots in the OpenSTV .blt file format and verify the results.
\n"; + echo "Please look at the automatic results to have a summary of the votes. "; + echo "You can also download the ballots in the OpenSTV .blt file format and verify the results.
\n"; echo "Please note that these results are automatically calculated and are thus not the official results.
\n"; - echo "".$election["question"]."
\n"; + echo "".htmlspecialchars($election["question"])."
\n"; echo "Anonymous token | Vote(s) | |
---|---|---|
".$anon_token["anon_token"]." | \n"; + echo "".htmlspecialchars($anon_token["anon_token"])." | \n"; echo "";
@@ -96,9 +96,9 @@ if ($display) {
echo "
\n"; } } @@ -114,7 +114,7 @@ if ($display) { } if (isset ($error) && $error != "") { - echo " ".$error." \n";;
+ echo "".htmlspecialchars($error)." \n";;
echo "If you don't understand the error, you should probably contact the Membership and Elections Committee, which can be reached at elections@gnome.org. \n"; } |