diff --git a/help.php b/help.php
index c1977c0..84e5f85 100644
--- a/help.php
+++ b/help.php
@@ -34,7 +34,7 @@ function draw_jquery($block_style) {
This page will not work very will until jquery has been set up.
To use jquery, create a file in
- /some/path/banwebplus/server_config.ini
+ /some/path/banwebplus/resources/server_config.ini
with the following line:
diff --git a/pages/users/forgot_password.php b/pages/users/forgot_password.php
index 88be5c5..c4aecda 100644
--- a/pages/users/forgot_password.php
+++ b/pages/users/forgot_password.php
@@ -21,7 +21,7 @@ function change_input(select_element) {
var jselect = $(select_element);
var option = jselect.val().toLowerCase();
var all = $(".credential_type");
- var others = [];
+ var others = array();
var joption = $("#"+option);
// get a list of the other options and store values
diff --git a/resources/ajax_calls.php b/resources/ajax_calls.php
index 2b501ff..07401d2 100644
--- a/resources/ajax_calls.php
+++ b/resources/ajax_calls.php
@@ -405,7 +405,7 @@ function load_shared_user_schedules() {
// build the list of commands and what to say to the guest
$sgc = json_encode(array(new command("failure", "")));
- $no_nos = [];
+ $no_nos = array();
$no_nos_base = array(
array('save_classes', 'load_user_classes',
json_encode(array(new command("failure", "Guest can't save classes")))),
diff --git a/resources/db_query.php b/resources/db_query.php
index f74a5b2..7733df2 100644
--- a/resources/db_query.php
+++ b/resources/db_query.php
@@ -49,7 +49,7 @@ function open_db() {
return TRUE;
}
- $a_configs = [];
+ $a_configs = array();
$filename = dirname(__FILE__)."/mysql_config.ini";
if (file_exists($filename)) {
$a_configs = parse_ini_file($filename);
diff --git a/resources/globals.php b/resources/globals.php
index f6ef38e..a1b7914 100644
--- a/resources/globals.php
+++ b/resources/globals.php
@@ -23,7 +23,7 @@ function define_global_vars() {
$global_loaded_server_settings = FALSE;
$mysqli = NULL;
- $a_configs = [];
+ $a_configs = array();
$filename = dirname(__FILE__) . "/server_config.ini";
if (file_exists($filename)) {
$a_configs = parse_ini_file($filename);
diff --git a/scraping/new_mexico_tech_banweb.py b/scraping/new_mexico_tech_banweb.py
index 92111ee..3269a47 100755
--- a/scraping/new_mexico_tech_banweb.py
+++ b/scraping/new_mexico_tech_banweb.py
@@ -21,7 +21,8 @@ def writeSelectToFile(selectArray, filename, path, title):
f.write(title+" = [['")
optionStrings = []
for optionParts in selectArray:
- optionStrings.append("','".join(optionParts))
+ sanitizedParts = [ p.replace('"', '\\"').replace("'", "\\'") for p in optionParts ]
+ optionStrings.append("','".join(sanitizedParts))
f.write("'],\n\t['".join(optionStrings))
f.write("']]")
f.close()
@@ -158,7 +159,7 @@ def getTerm(semester, subjects, parser):
url = "http://banweb7.nmt.edu/pls/PROD/hwzkcrof.P_UncgSrchCrsOff?p_term="+t.getSemester()+"&p_subj="+subjectName.replace(" ", "%20")
print url
page = urllib2.urlopen(url)
- soup = BeautifulSoup(page)
+ soup = BeautifulSoup(page, "lxml")
trs = soup.findAll("tr")
trs = trs[1:] #discard the retarded row that banweb is retarded about
print_verbose("adding subject "+subjectName)
@@ -178,7 +179,7 @@ def main(parser):
page = urllib2.urlopen(url)
- soup = BeautifulSoup(page)
+ soup = BeautifulSoup(page, "lxml")
path = ""
if (type(parser.path) == type("")):