Index: trunk/wb/include/htmlarea/popups/link.php
===================================================================
--- trunk/wb/include/htmlarea/popups/link.php	(revision 35)
+++ trunk/wb/include/htmlarea/popups/link.php	(revision 36)
@@ -75,7 +75,7 @@
 	global $template, $database;
 	$get_pages = $database->query("SELECT page_id,menu_title,link,level FROM ".TABLE_PREFIX."pages WHERE parent = '$parent' AND visibility!='deleted' ORDER BY position ASC");
 	while($page = $get_pages->fetchRow()) {
-		$title = stripslashes($page['menu_title']);
+		$title = $admin->stripslashes($page['menu_title']);
 		// Add leading -'s so we can tell what level a page is at
 		$leading_dashes = '';
 		for($i = 0; $i < $page['level']; $i++) {
@@ -99,7 +99,7 @@
 	$template->parse('page_list', 'page_list_block', true);
 	// Loop through pages
 	while($page = $get_pages->fetchRow()) {
-		$title = stripslashes($page['menu_title']);
+		$title = $admin->stripslashes($page['menu_title']);
 		$template->set_var('TITLE', $title);
 		$template->set_var('LINK', '[wblink'.$page['page_id'].']');
 		$template->parse('page_list', 'page_list_block', true);
Index: trunk/wb/search/search.php
===================================================================
--- trunk/wb/search/search.php	(revision 35)
+++ trunk/wb/search/search.php	(revision 36)
@@ -1,6 +1,6 @@
 <?php
 
-// $Id: search.php,v 1.9 2005/04/07 07:53:15 rdjurovich Exp $
+// $Id$
 
 /*
 
@@ -33,13 +33,13 @@
 	// Make pages_listed and items_listed blank arrays
 	$pages_listed = array();
 	$items_listed = array();
-	
+
 	// Get search string
 	if(isset($_POST['string'])) {
-		$string = addslashes(str_replace(',', '', $_POST['string']));
-		$search_string = htmlspecialchars(stripslashes($string),ENT_QUOTES);
+		$string = addslashes(addslashes(str_replace(',', '', $_POST['string'])));
+		$search_string = htmlspecialchars($this->stripslashes(str_replace(',', '', $_POST['string'])),ENT_QUOTES);
 	} else {
-		$string = '';
+		$string = '';
 		$search_string = '';
 	}
 	
@@ -81,17 +81,17 @@
 		$operator = 'LIKE';
 		$wildcard = '%';
 		$all_checked = ' checked';
-	}
-	
-	// Get list of usernames and display names
-	$query_users = $database->query("SELECT user_id,username,display_name FROM ".TABLE_PREFIX."users");
-	$users = array('0' => array('display_name' => $TEXT['UNKNOWN'], 'username' => strtolower($TEXT['UNKNOWN'])));
-	if($query_users->numRows() > 0) {
-		while($user = $query_users->fetchRow()) {
-			$users[$user['user_id']] = array('display_name' => $user['display_name'], 'username' => $user['username']);
-		}
 	}
 	
+	// Get list of usernames and display names
+	$query_users = $database->query("SELECT user_id,username,display_name FROM ".TABLE_PREFIX."users");
+	$users = array('0' => array('display_name' => $TEXT['UNKNOWN'], 'username' => strtolower($TEXT['UNKNOWN'])));
+	if($query_users->numRows() > 0) {
+		while($user = $query_users->fetchRow()) {
+			$users[$user['user_id']] = array('display_name' => $user['display_name'], 'username' => $user['username']);
+		}
+	}
+	
 	// Get search settings
 	$query_header = $database->query("SELECT value FROM ".TABLE_PREFIX."search WHERE name = 'header' LIMIT 1");
 	$fetch_header = $query_header->fetchRow();
@@ -109,13 +109,13 @@
 	// Replace vars in search settings with values
 	$vars = array('[SEARCH_STRING]', '[WB_URL]', '[PAGE_EXTENSION]', '[TEXT_RESULTS_FOR]');
 	$values = array($search_string, WB_URL, PAGE_EXTENSION, $TEXT['RESULTS_FOR']);
-	$search_footer = str_replace($vars, $values, stripslashes($fetch_footer['value']));
-	$search_results_header = str_replace($vars, $values, stripslashes($fetch_results_header['value']));
-	$search_results_footer = str_replace($vars, $values, stripslashes($fetch_results_footer['value']));
+	$search_footer = str_replace($vars, $values, $this->stripslashes($fetch_footer['value']));
+	$search_results_header = str_replace($vars, $values, $this->stripslashes($fetch_results_header['value']));
+	$search_results_footer = str_replace($vars, $values, $this->stripslashes($fetch_results_footer['value']));
 	// Do extra vars/values replacement
 	$vars = array('[SEARCH_STRING]', '[WB_URL]', '[PAGE_EXTENSION]', '[TEXT_SEARCH]', '[TEXT_ALL_WORDS]', '[TEXT_ANY_WORDS]', '[TEXT_EXACT_MATCH]', '[TEXT_MATCH]', '[TEXT_MATCHING]', '[ALL_CHECKED]', '[ANY_CHECKED]', '[EXACT_CHECKED]');
 	$values = array($search_string, WB_URL, PAGE_EXTENSION, $TEXT['SEARCH'], $TEXT['ALL_WORDS'], $TEXT['ANY_WORDS'], $TEXT['EXACT_MATCH'], $TEXT['MATCH'], $TEXT['MATCHING'], $all_checked, $any_checked, $exact_checked);
-	$search_header = str_replace($vars, $values, stripslashes($fetch_header['value']));
+	$search_header = str_replace($vars, $values, $this->stripslashes($fetch_header['value']));
 	
 	// Insert js code
 	?>
@@ -138,13 +138,12 @@
 		
 		// Show search results_header
 		echo $search_results_header;
-		
 		// Search page details only, such as description, keywords, etc.
 		if($match == 'all' OR $match == 'exact') {
 			$query_pages = $database->query("SELECT page_id, page_title, menu_title, link, description, modified_when, modified_by FROM ".TABLE_PREFIX."pages".
-			" WHERE visibility != 'none' AND visibility != 'deleted' AND page_title $operator '$wildcard$string$wildcard' AND searching = '1' ".
+			" WHERE visibility != 'none' AND visibility != 'deleted' AND page_title $operator '$wildcard$string$wildcard' AND searching = '1' ".
 			" OR visibility != 'none' AND visibility != 'deleted' AND menu_title $operator '$wildcard$string$wildcard' AND searching = '1'".
-			" OR visibility != 'none' AND visibility != 'deleted' AND description $operator '$wildcard$string$wildcard' AND searching = '1'".
+			" OR visibility != 'none' AND visibility != 'deleted' AND description $operator '$wildcard$string$wildcard' AND searching = '1'".
 			" OR visibility != 'none' AND visibility != 'deleted' AND keywords $operator '$wildcard$string$wildcard' AND searching = '1'");
 		} elseif($match == 'any') {
 			$query_pages = "SELECT page_id, page_title, menu_title, link, description, modified_when, modified_by FROM ".TABLE_PREFIX."pages WHERE ";
@@ -151,9 +150,9 @@
 			$count = 0;
 			foreach($string AS $each_string) {
 				if($count != 0) { $query_pages .= ' OR'; }
-				$query_pages .= " visibility != 'none' AND page_title $operator '$wildcard$each_string$wildcard' AND searching = '1'".
+				$query_pages .= " visibility != 'none' AND page_title $operator '$wildcard$each_string$wildcard' AND searching = '1'".
 				" OR visibility != 'none' AND visibility != 'deleted' AND menu_title $operator '$wildcard$each_string$wildcard' AND searching = '1'".
-				" OR visibility != 'none' AND visibility != 'deleted' AND description $operator '$wildcard$each_string$wildcard' AND searching = '1'".
+				" OR visibility != 'none' AND visibility != 'deleted' AND description $operator '$wildcard$each_string$wildcard' AND searching = '1'".
 				" OR visibility != 'none' AND visibility != 'deleted' AND keywords $operator '$wildcard$each_string$wildcard' AND searching = '1'";
 				$count = $count+1;
 			}
@@ -165,22 +164,22 @@
 				// Get page link
 				$link = page_link($page['link']);
 				// Set vars to be replaced by values
-				$vars = array('[LINK]', '[TITLE]', '[DESCRIPTION]', '[USERNAME]','[DISPLAY_NAME]','[DATE]','[TIME]','[TEXT_LAST_UPDATED_BY]','[TEXT_ON]');
-				if($page['modified_when'] > 0) {
-					$date = gmdate(DATE_FORMAT, $page['modified_when']+TIMEZONE);
-					$time = gmdate(TIME_FORMAT, $page['modified_when']+TIMEZONE);
-				} else {
-					$date = $TEXT['UNKNOWN'].' '.$TEXT['DATE'];
-					$time = $TEXT['UNKNOWN'].' '.$TEXT['TIME'];
+				$vars = array('[LINK]', '[TITLE]', '[DESCRIPTION]', '[USERNAME]','[DISPLAY_NAME]','[DATE]','[TIME]','[TEXT_LAST_UPDATED_BY]','[TEXT_ON]');
+				if($page['modified_when'] > 0) {
+					$date = gmdate(DATE_FORMAT, $page['modified_when']+TIMEZONE);
+					$time = gmdate(TIME_FORMAT, $page['modified_when']+TIMEZONE);
+				} else {
+					$date = $TEXT['UNKNOWN'].' '.$TEXT['DATE'];
+					$time = $TEXT['UNKNOWN'].' '.$TEXT['TIME'];
 				}
-				$values = array($link, stripslashes($page['page_title']),stripslashes($page['description']), $users[$page['modified_by']]['username'], $users[$page['modified_by']]['display_name'], $date, $time, $TEXT['LAST_UPDATED_BY'], strtolower($TEXT['ON']));
-				// Show loop code with vars replaced by values
+				$values = array($link, $this->stripslashes($page['page_title']),$this->stripslashes($page['description']), $users[$page['modified_by']]['username'], $users[$page['modified_by']]['display_name'], $date, $time, $TEXT['LAST_UPDATED_BY'], strtolower($TEXT['ON']));
+				// Show loop code with vars replaced by values
 				if($values != array()) {
-					echo str_replace($vars, $values, stripslashes($fetch_results_loop['value']));
+					echo str_replace($vars, $values, $this->stripslashes($fetch_results_loop['value']));
 				}
 				// Say that we have already listed this page id
-				$pages_listed[$page['page_id']] = true;
-				// Set values to blank
+				$pages_listed[$page['page_id']] = true;
+				// Set values to blank
 				$value = array();
 			}
 		}
@@ -199,7 +198,7 @@
 					// Fetch query start
 					$fetch_query_start = $get_query_start->fetchRow();
 					// Prepare query start for execution by replacing {TP} with the TABLE_PREFIX
-					$query_start = str_replace('[TP]', TABLE_PREFIX, stripslashes($fetch_query_start['value']));
+					$query_start = str_replace('[TP]', TABLE_PREFIX, $this->stripslashes($fetch_query_start['value']));
 					// Get query end
 					$get_query_end = $database->query("SELECT value FROM ".TABLE_PREFIX."search WHERE name = 'query_end' AND extra = '$module_name' LIMIT 1");
 					if($get_query_end->numRows() > 0) {
@@ -206,7 +205,7 @@
 						// Fetch query start
 						$fetch_query_end = $get_query_end->fetchRow();
 						// Set query end
-						$query_end = stripslashes($fetch_query_end['value']);
+						$query_end = $this->stripslashes($fetch_query_end['value']);
 						// Get query body
 						$get_query_body = $database->query("SELECT value FROM ".TABLE_PREFIX."search WHERE name = 'query_body' AND extra = '$module_name' LIMIT 1");
 						if($get_query_body->numRows() > 0) {
@@ -213,7 +212,7 @@
 							// Fetch query start
 							$fetch_query_body = $get_query_body->fetchRow();
 							// Prepare query body for execution by replacing {STRING} with the correct one
-							$query_body = str_replace(array('[TP]','[O]','[W]'), array(TABLE_PREFIX,$operator,$wildcard), stripslashes($fetch_query_body['value']));
+							$query_body = str_replace(array('[TP]','[O]','[W]'), array(TABLE_PREFIX,$operator,$wildcard), $this->stripslashes($fetch_query_body['value']));
 							// If we need to match any of the words, loop through the body for each one then combine with start and end, otherwise just combine without looping
 							if($match == 'any') {
 								// Loop through query body for each string, then combine with start and end
@@ -238,18 +237,18 @@
 									if(!isset($fields['page_id']) OR !isset($pages_listed[$page[$fields['page_id']]])) {
 										// Get page link
 										$link = page_link($page[$fields['link']]);
-										// Set vars to be replaced by values
-										$vars = array('[LINK]', '[TITLE]', '[DESCRIPTION]', '[USERNAME]','[DISPLAY_NAME]','[DATE]','[TIME]','[TEXT_LAST_UPDATED_BY]','[TEXT_ON]');
-										if($page[$fields['modified_when']] > 0) {
-											$date = gmdate(DATE_FORMAT, $page[$fields['modified_when']]+TIMEZONE);
-											$time = gmdate(TIME_FORMAT, $page[$fields['modified_when']]+TIMEZONE);
-										} else {
-											$date = $TEXT['UNKNOWN'].' '.$TEXT['DATE'];
-											$time = $TEXT['UNKNOWN'].' '.$TEXT['TIME'];
+										// Set vars to be replaced by values
+										$vars = array('[LINK]', '[TITLE]', '[DESCRIPTION]', '[USERNAME]','[DISPLAY_NAME]','[DATE]','[TIME]','[TEXT_LAST_UPDATED_BY]','[TEXT_ON]');
+										if($page[$fields['modified_when']] > 0) {
+											$date = gmdate(DATE_FORMAT, $page[$fields['modified_when']]+TIMEZONE);
+											$time = gmdate(TIME_FORMAT, $page[$fields['modified_when']]+TIMEZONE);
+										} else {
+											$date = $TEXT['UNKNOWN'].' '.$TEXT['DATE'];
+											$time = $TEXT['UNKNOWN'].' '.$TEXT['TIME'];
 										}
-										$values = array($link, stripslashes($page[$fields['title']]), stripslashes($page[$fields['description']]), $users[$page[$fields['modified_by']]]['username'], $users[$page[$fields['modified_by']]]['display_name'], $date, $time, $TEXT['LAST_UPDATED_BY'], strtolower($TEXT['ON']));
+										$values = array($link, $this->stripslashes($page[$fields['title']]), $this->stripslashes($page[$fields['description']]), $users[$page[$fields['modified_by']]]['username'], $users[$page[$fields['modified_by']]]['display_name'], $date, $time, $TEXT['LAST_UPDATED_BY'], strtolower($TEXT['ON']));
 										// Show loop code with vars replaced by values
-										echo str_replace($vars, $values, stripslashes($fetch_results_loop['value']));
+										echo str_replace($vars, $values, $this->stripslashes($fetch_results_loop['value']));
 										// Say that this page or item has been listed if we can
 										if(isset($fields['page_id'])) {
 											$pages_listed[$page[$fields['page_id']]] = true;
Index: trunk/wb/admin/pages/intro.php
===================================================================
--- trunk/wb/admin/pages/intro.php	(revision 35)
+++ trunk/wb/admin/pages/intro.php	(revision 36)
@@ -1,6 +1,6 @@
 <?php
 
-// $Id: intro.php,v 1.2 2005/04/02 06:25:37 rdjurovich Exp $
+// $Id$
 
 /*
 
@@ -43,7 +43,7 @@
 $template->set_file('page', 'intro.html');
 $template->set_block('page', 'main_block', 'main');
 $template->set_var(array(
-								'CONTENT' => stripslashes($content),
+								'CONTENT' => $admin->stripslashes($content),
 								'WB_URL' => WB_URL,
 								'ADMIN_URL' => ADMIN_URL,
 								'TEXT_SAVE' => $TEXT['SAVE'],
Index: trunk/wb/admin/pages/settings.php
===================================================================
--- trunk/wb/admin/pages/settings.php	(revision 35)
+++ trunk/wb/admin/pages/settings.php	(revision 36)
@@ -79,10 +79,10 @@
 $template->set_block('page', 'main_block', 'main');
 $template->set_var(array(
 								'PAGE_ID' => $results_array['page_id'],
-								'PAGE_TITLE' => stripslashes($results_array['page_title']),
-								'MENU_TITLE' => stripslashes($results_array['menu_title']),
-								'DESCRIPTION' => stripslashes($results_array['description']),
-								'KEYWORDS' => stripslashes($results_array['keywords']),
+								'PAGE_TITLE' => $admin->stripslashes($results_array['page_title']),
+								'MENU_TITLE' => $admin->stripslashes($results_array['menu_title']),
+								'DESCRIPTION' => $admin->stripslashes($results_array['description']),
+								'KEYWORDS' => $admin->stripslashes($results_array['keywords']),
 								'MODIFIED_BY' => $user['display_name'],
 								'MODIFIED_BY_USERNAME' => $user['username'],
 								'MODIFIED_WHEN' => $modified_ts,
@@ -251,7 +251,7 @@
 			for($i = 1; $i <= $page['level']; $i++) { $title_prefix .= ' - '; }
 				$template->set_var(array(
 												'ID' => $page['page_id'],
-												'TITLE' => stripslashes($title_prefix.$page['page_title'])
+												'TITLE' => $admin->stripslashes($title_prefix.$page['page_title'])
 												)
 										);
 				if($results_array['parent'] == $page['page_id']) {
Index: trunk/wb/admin/pages/index.php
===================================================================
--- trunk/wb/admin/pages/index.php	(revision 35)
+++ trunk/wb/admin/pages/index.php	(revision 36)
@@ -24,7 +24,7 @@
 require('../../config.php');
 require_once(WB_PATH.'/framework/class.admin.php');
 $admin = new admin('Pages', 'pages');
-
+echo "hier: ".get_magic_quotes_gpc();
 // Include the WB functions file
 require_once(WB_PATH.'/framework/functions.php');
 
@@ -151,15 +151,15 @@
 				</td>
 				<?php if($admin->get_permission('pages_modify') == true AND $can_modify == true) { ?>
 				<td>
-					<a href="<?php echo ADMIN_URL; ?>/pages/modify.php?page_id=<?php echo $page['page_id']; ?>" title="<?php echo $TEXT['MODIFY']; ?>"><?php echo stripslashes($page['page_title']); ?></a>
+					<a href="<?php echo ADMIN_URL; ?>/pages/modify.php?page_id=<?php echo $page['page_id']; ?>" title="<?php echo $TEXT['MODIFY']; ?>"><?php echo $admin->stripslashes($page['page_title']); ?></a>
 				</td>
 				<?php } else { ?>
 				<td>
-					<?php	echo stripslashes($page['page_title']); ?>
+					<?php	echo $admin->stripslashes($page['page_title']); ?>
 				</td>
 				<?php } ?>
 				<td align="left" width="232">
-					<font color="#999999"><?php echo $page['menu_title']; ?></font>
+					<font color="#999999"><?php echo $admin->stripslashes($page['menu_title']); ?></font>
 				</td>
 				<td align="center" valign="middle" width="90">
 				<?php if($page['visibility'] == 'public') { ?>
@@ -447,7 +447,7 @@
 			for($i = 1; $i <= $page['level']; $i++) { $title_prefix .= ' - '; }
 				$template->set_var(array(
 												'ID' => $page['page_id'],
-												'TITLE' => stripslashes($title_prefix.$page['page_title'])
+												'TITLE' => $admin->stripslashes($title_prefix.$page['page_title'])
 												)
 										);
 				if($can_modify == true) {
Index: trunk/wb/admin/pages/trash.php
===================================================================
--- trunk/wb/admin/pages/trash.php	(revision 35)
+++ trunk/wb/admin/pages/trash.php	(revision 36)
@@ -1,6 +1,6 @@
 <?php
 
-// $Id: trash.php,v 1.2 2005/04/02 06:25:37 rdjurovich Exp $
+// $Id$
 
 /*
 
@@ -141,15 +141,15 @@
 				</td>
 				<?php if($admin->get_permission('pages_modify') == true AND $can_modify == true AND $page['visibility'] != 'heading') { ?>
 				<td>
-					<a href="<?php echo ADMIN_URL; ?>/pages/modify.php?page_id=<?php echo $page['page_id']; ?>" title="<?php echo $TEXT['MODIFY']; ?>"><?php echo stripslashes($page['page_title']); ?></a>
+					<a href="<?php echo ADMIN_URL; ?>/pages/modify.php?page_id=<?php echo $page['page_id']; ?>" title="<?php echo $TEXT['MODIFY']; ?>"><?php echo $admin->stripslashes($page['page_title']); ?></a>
 				</td>
 				<?php } else { ?>
 				<td>
 					<?php
 					if($page['visibility'] != 'heading') {
-						echo stripslashes($page['page_title']);
+						echo $admin->stripslashes($page['page_title']);
 					} else {
-						echo '<b>'.stripslashes($page['page_title']).'</b>';
+						echo '<b>'.$admin->stripslashes($page['page_title']).'</b>';
 					}
 					?>
 				</td>
Index: trunk/wb/admin/pages/sections.php
===================================================================
--- trunk/wb/admin/pages/sections.php	(revision 35)
+++ trunk/wb/admin/pages/sections.php	(revision 36)
@@ -134,7 +134,7 @@
 	</td>
 	<td align="right">
 		<?php echo $TEXT['CURRENT_PAGE']; ?>: 
-		<b><?php echo stripslashes($results_array['page_title']); ?></b>
+		<b><?php echo $admin->stripslashes($results_array['page_title']); ?></b>
 		-
 		<a href="<?php echo ADMIN_URL; ?>/pages/modify.php?page_id=<?php echo $page_id; ?>"><?php echo $HEADING['MODIFY_PAGE']; ?></a>
 		-
Index: trunk/wb/admin/pages/modify.php
===================================================================
--- trunk/wb/admin/pages/modify.php	(revision 35)
+++ trunk/wb/admin/pages/modify.php	(revision 36)
@@ -1,6 +1,6 @@
 <?php
 
-// $Id: modify.php,v 1.2 2005/04/02 06:25:37 rdjurovich Exp $
+// $Id$
 
 /*
 
@@ -81,7 +81,7 @@
 $template->set_block('page', 'main_block', 'main');
 $template->set_var(array(
 								'PAGE_ID' => $results_array['page_id'],
-								'PAGE_TITLE' => stripslashes($results_array['page_title']),
+								'PAGE_TITLE' => $admin->stripslashes($results_array['page_title']),
 								'MODIFIED_BY' => $user['display_name'],
 								'MODIFIED_BY_USERNAME' => $user['username'],
 								'MODIFIED_WHEN' => $modified_ts,
Index: trunk/wb/admin/settings/index.php
===================================================================
--- trunk/wb/admin/settings/index.php	(revision 35)
+++ trunk/wb/admin/settings/index.php	(revision 36)
@@ -45,7 +45,7 @@
 $results = $database->query($query);
 while($setting = $results->fetchRow()) {
 	$setting_name = $setting['name'];
-	$setting_value = htmlspecialchars(stripslashes($setting['value']));
+	$setting_value = htmlspecialchars($admin->stripslashes($setting['value']));
 	switch($setting_name) {
 		// Website title
 		case 'title':
@@ -79,7 +79,7 @@
 $results = $database->query($query);
 while($setting = $results->fetchRow()) {
 	$setting_name = $setting['name'];
-	$setting_value = htmlspecialchars(stripslashes($setting['value']));
+	$setting_value = htmlspecialchars($admin->stripslashes($setting['value']));
 	switch($setting_name) {
 		// Search header
 		case 'header':
@@ -463,7 +463,7 @@
 }
 
 // Insert WYSIWYG style value into template
-$template->set_var('WYSIWYG_STYLE', stripslashes(WYSIWYG_STYLE));
+$template->set_var('WYSIWYG_STYLE', $admin->stripslashes(WYSIWYG_STYLE));
 
 // Insert Server Email value into template
 $template->set_var('SERVER_EMAIL', SERVER_EMAIL);
Index: trunk/wb/modules/wrapper/view.php
===================================================================
--- trunk/wb/modules/wrapper/view.php	(revision 35)
+++ trunk/wb/modules/wrapper/view.php	(revision 36)
@@ -1,6 +1,6 @@
 <?php
 
-// $Id: view.php,v 1.1.1.1 2005/01/30 10:32:23 rdjurovich Exp $
+// $Id$
 
 /*
 
@@ -26,7 +26,7 @@
 // Get url
 $get_settings = $database->query("SELECT url,height FROM ".TABLE_PREFIX."mod_wrapper WHERE section_id = '$section_id'");
 $fetch_settings = $get_settings->fetchRow();
-$url = stripslashes($fetch_settings['url']);
+$url = $this->stripslashes($fetch_settings['url']);
 
 ?>
 <iframe src="<?php echo $url; ?>" width="100%" height="<?php echo $fetch_settings['height']; ?>px" frameborder="0" scrolling="auto">
Index: trunk/wb/modules/wrapper/modify.php
===================================================================
--- trunk/wb/modules/wrapper/modify.php	(revision 35)
+++ trunk/wb/modules/wrapper/modify.php	(revision 36)
@@ -1,6 +1,6 @@
 <?php
 
-// $Id: modify.php,v 1.1.1.1 2005/01/30 10:32:23 rdjurovich Exp $
+// $Id$
 
 /*
 
@@ -32,7 +32,7 @@
 $query = "SELECT url,height FROM ".TABLE_PREFIX."mod_wrapper WHERE section_id = '$section_id'";
 $get_settings = $database->query($query);
 $settings = $get_settings->fetchRow();
-$url = stripslashes($settings['url']);
+$url = $admin->stripslashes($settings['url']);
 $height = $settings['height'];
 
 // Insert vars
Index: trunk/wb/modules/menu_link/modify.php
===================================================================
--- trunk/wb/modules/menu_link/modify.php	(revision 35)
+++ trunk/wb/modules/menu_link/modify.php	(revision 36)
@@ -1,6 +1,6 @@
 <?php
 
-// $Id: modify.php,v 1.1.1.1 2005/01/30 10:32:15 rdjurovich Exp $
+// $Id$
 
 /*
 
@@ -32,7 +32,7 @@
 $query_info = "SELECT link,target FROM ".TABLE_PREFIX."pages WHERE page_id = '$page_id'";
 $get_info = $database->query($query_info);
 $fetch_info = $get_info->fetchRow();
-$link = stripslashes($fetch_info['link']);
+$link = $admin->stripslashes($fetch_info['link']);
 $target = $fetch_info['target'];
 
 // Insert vars
Index: trunk/wb/modules/wysiwyg/view.php
===================================================================
--- trunk/wb/modules/wysiwyg/view.php	(revision 35)
+++ trunk/wb/modules/wysiwyg/view.php	(revision 36)
@@ -1,6 +1,6 @@
 <?php
 
-// $Id: view.php,v 1.3 2005/06/21 09:08:41 rdjurovich Exp $
+// $Id$
 
 /*
 
@@ -26,7 +26,7 @@
 // Get content
 $get_content = $database->query("SELECT content FROM ".TABLE_PREFIX."mod_wysiwyg WHERE section_id = '$section_id'");
 $fetch_content = $get_content->fetchRow();
-$content = stripslashes($fetch_content['content']);
+$content = $this->stripslashes($fetch_content['content']);
 
 $this->preprocess($content);
 
Index: trunk/wb/modules/wysiwyg/modify.php
===================================================================
--- trunk/wb/modules/wysiwyg/modify.php	(revision 35)
+++ trunk/wb/modules/wysiwyg/modify.php	(revision 36)
@@ -1,6 +1,6 @@
 <?php
 
-// $Id: modify.php,v 1.3 2005/06/21 09:11:10 rdjurovich Exp $
+// $Id$
 
 /*
 
@@ -29,7 +29,7 @@
 $query = "SELECT content FROM ".TABLE_PREFIX."mod_wysiwyg WHERE section_id = '$section_id'";
 $get_content = $database->query($query);
 $content = $get_content->fetchRow();
-$content = stripslashes(htmlspecialchars($content['content']));
+$content = $admin->stripslashes(htmlspecialchars($content['content']));
 
 // Load HTMLArea
 if(!isset($loaded_htmlarea)) {
@@ -55,7 +55,7 @@
 		echo 'var editor = new HTMLArea("content'.$wysiwyg_section["section_id"].'");'
 			. 'editor.registerPlugin(ContextMenu);'
 			. 'editor.registerPlugin(TableOperations);'
-			. 'editor.config.pageStyle = "body { '.stripslashes(WYSIWYG_STYLE).' }";'
+			. 'editor.config.pageStyle = "body { '.$admin->stripslashes(WYSIWYG_STYLE).' }";'
 			. 'editor.generate();';
 		}
 	}
Index: trunk/wb/modules/form/modify_field.php
===================================================================
--- trunk/wb/modules/form/modify_field.php	(revision 35)
+++ trunk/wb/modules/form/modify_field.php	(revision 36)
@@ -1,6 +1,6 @@
 <?php
 
-// $Id: modify_field.php,v 1.5 2005/06/21 09:13:12 rdjurovich Exp $
+// $Id$
 
 /*
 
@@ -63,7 +63,7 @@
 <tr>
 	<td width="80"><?php echo $TEXT['TITLE']; ?>:</td>
 	<td>
-		<input type="text" name="title" value="<?php echo htmlspecialchars(stripslashes($form['title'])); ?>" style="width: 100%;" maxlength="255" />
+		<input type="text" name="title" value="<?php echo htmlspecialchars($admin->stripslashes($form['title'])); ?>" style="width: 100%;" maxlength="255" />
 	</td>
 </tr>
 <tr>
@@ -86,7 +86,7 @@
 	<tr>
 		<td valign="top"><?php echo $TEXT['TEMPLATE']; ?>:</td>
 		<td>
-		<textarea name="template" style="width: 100%; height: 20px;"><?php echo htmlspecialchars(stripslashes($form['extra'])); ?></textarea>
+		<textarea name="template" style="width: 100%; height: 20px;"><?php echo htmlspecialchars($admin->stripslashes($form['extra'])); ?></textarea>
 		</td>
 	</tr>
 	<?php } elseif($type == 'textfield') { ?>
Index: trunk/wb/modules/form/modify_settings.php
===================================================================
--- trunk/wb/modules/form/modify_settings.php	(revision 35)
+++ trunk/wb/modules/form/modify_settings.php	(revision 36)
@@ -1,6 +1,6 @@
 <?php
 
-// $Id: modify_settings.php,v 1.4 2005/03/28 11:58:04 rdjurovich Exp $
+// $Id$
 
 /*
 
@@ -58,25 +58,25 @@
 <tr>
 	<td class="setting_name" width="220"><?php echo $TEXT['HEADER']; ?>:</td>
 	<td class="setting_name">
-		<textarea name="header" style="width: 100%; height: 80px;"><?php echo stripslashes($setting['header']); ?></textarea>
+		<textarea name="header" style="width: 100%; height: 80px;"><?php echo $admin->stripslashes($setting['header']); ?></textarea>
 	</td>
 </tr>
 <tr>
 	<td class="setting_name"><?php echo $TEXT['FIELD'].' '.$TEXT['LOOP']; ?>:</td>
 	<td class="setting_name">
-		<textarea name="field_loop" style="width: 100%; height: 60px;"><?php echo stripslashes($setting['field_loop']); ?></textarea>
+		<textarea name="field_loop" style="width: 100%; height: 60px;"><?php echo $admin->stripslashes($setting['field_loop']); ?></textarea>
 	</td>
 </tr>
 <tr>
 	<td class="setting_name"><?php echo $TEXT['FOOTER']; ?>:</td>
 	<td class="setting_name">
-		<textarea name="footer" style="width: 100%; height: 80px;"><?php echo str_replace($raw, $friendly, stripslashes($setting['footer'])); ?></textarea>
+		<textarea name="footer" style="width: 100%; height: 80px;"><?php echo str_replace($raw, $friendly, $admin->stripslashes($setting['footer'])); ?></textarea>
 	</td>
 </tr>
 <tr>
 	<td class="setting_name"><?php echo $TEXT['EMAIL'].' '.$TEXT['TO']; ?>:</td>
 	<td class="setting_name">
-		<textarea name="email_to" style="width: 100%; height: 30px;"><?php echo str_replace($raw, $friendly, stripslashes($setting['email_to'])); ?></textarea>
+		<textarea name="email_to" style="width: 100%; height: 30px;"><?php echo str_replace($raw, $friendly, $admin->stripslashes($setting['email_to'])); ?></textarea>
 	</td>
 </tr>
 <tr>
@@ -85,7 +85,7 @@
 		<select name="email_from_field" style="width: 100%;">
 			<option value="" onclick="javascript: document.getElementById('email_from').style.display = 'block';"><?php echo $TEXT['CUSTOM']; ?>:</option>
 			<?php
-			$email_from_value = str_replace($raw, $friendly, stripslashes($setting['email_from']));
+			$email_from_value = str_replace($raw, $friendly, $admin->stripslashes($setting['email_from']));
 			$query_email_fields = $database->query("SELECT field_id,title FROM ".TABLE_PREFIX."mod_form_fields ORDER BY position ASC");
 			if($query_email_fields->numRows() > 0) {
 				while($field = $query_email_fields->fetchRow()) {
@@ -104,25 +104,25 @@
 <tr>
 	<td class="setting_name"><?php echo $TEXT['EMAIL'].' '.$TEXT['SUBJECT']; ?>:</td>
 	<td class="setting_name">
-		<input type="text" name="email_subject" style="width: 100%;" maxlength="255" value="<?php echo str_replace($raw, $friendly, stripslashes($setting['email_subject'])); ?>" />
+		<input type="text" name="email_subject" style="width: 100%;" maxlength="255" value="<?php echo str_replace($raw, $friendly, $admin->stripslashes($setting['email_subject'])); ?>" />
 	</td>
 </tr>
 <tr>
 	<td class="setting_name"><?php echo $TEXT['SUCCESS'].' '.$TEXT['MESSAGE']; ?>:</td>
 	<td class="setting_name">
-		<textarea name="success_message" style="width: 100%; height: 80px;"><?php echo str_replace($raw, $friendly, stripslashes($setting['success_message'])); ?></textarea>
+		<textarea name="success_message" style="width: 100%; height: 80px;"><?php echo str_replace($raw, $friendly, $admin->stripslashes($setting['success_message'])); ?></textarea>
 	</td>
 </tr>
 <tr>
 	<td class="setting_name"><?php echo $TEXT['MAX_SUBMISSIONS_PER_HOUR']; ?>:</td>
 	<td class="setting_name">
-		<input type="text" name="max_submissions" style="width: 100%;" maxlength="255" value="<?php echo str_replace($raw, $friendly, stripslashes($setting['max_submissions'])); ?>" />
+		<input type="text" name="max_submissions" style="width: 100%;" maxlength="255" value="<?php echo str_replace($raw, $friendly, $admin->stripslashes($setting['max_submissions'])); ?>" />
 	</td>
 </tr>
 <tr>
 	<td class="setting_name"><?php echo $TEXT['SUBMISSIONS_STORED_IN_DATABASE']; ?>:</td>
 	<td class="setting_name">
-		<input type="text" name="stored_submissions" style="width: 100%;" maxlength="255" value="<?php echo str_replace($raw, $friendly, stripslashes($setting['stored_submissions'])); ?>" />
+		<input type="text" name="stored_submissions" style="width: 100%;" maxlength="255" value="<?php echo str_replace($raw, $friendly, $admin->stripslashes($setting['stored_submissions'])); ?>" />
 	</td>
 </tr>
 </table>
Index: trunk/wb/modules/form/view.php
===================================================================
--- trunk/wb/modules/form/view.php	(revision 35)
+++ trunk/wb/modules/form/view.php	(revision 36)
@@ -1,6 +1,6 @@
 <?php
 
-// $Id: view.php,v 1.7 2005/04/08 07:36:58 rdjurovich Exp $
+// $Id$
 
 /*
 
@@ -113,9 +113,9 @@
 $query_settings = $database->query("SELECT header,field_loop,footer FROM ".TABLE_PREFIX."mod_form_settings WHERE section_id = '$section_id'");
 if($query_settings->numRows() > 0) {
 	$fetch_settings = $query_settings->fetchRow();
-	$header = stripslashes($fetch_settings['header']);
-	$field_loop = stripslashes($fetch_settings['field_loop']);
-	$footer = stripslashes($fetch_settings['footer']);
+	$header = $this->stripslashes($fetch_settings['header']);
+	$field_loop = $this->stripslashes($fetch_settings['field_loop']);
+	$footer = $this->stripslashes($fetch_settings['footer']);
 } else {
 	$header = '';
 	$field_loop = '';
@@ -136,7 +136,7 @@
 	while($field = $query_fields->fetchRow()) {
 		// Set field values
 		$field_id = $field['field_id'];
-		$value = stripslashes($field['value']);
+		$value = $this->stripslashes($field['value']);
 		// Print field_loop after replacing vars with values
 		$vars = array('{TITLE}', '{REQUIRED}');
 		$values = array($field['title']);
@@ -198,16 +198,16 @@
 	$query_settings = $database->query("SELECT email_to,email_from,email_subject,success_message,max_submissions,stored_submissions FROM ".TABLE_PREFIX."mod_form_settings WHERE section_id = '$section_id'");
 	if($query_settings->numRows() > 0) {
 		$fetch_settings = $query_settings->fetchRow();
-		$email_to = stripslashes($fetch_settings['email_to']);
-		$email_from = stripslashes($fetch_settings['email_from']);
+		$email_to = $this->stripslashes($fetch_settings['email_to']);
+		$email_from = $this->stripslashes($fetch_settings['email_from']);
 		if(substr($email_from, 0, 5) == 'field') {
 			// Set the email from field to what the user entered in the specified field
 			$email_from = addslashes($_POST[$email_from]);
 		}
-		$email_subject = stripslashes($fetch_settings['email_subject']);
-		$success_message = stripslashes($fetch_settings['success_message']);
-		$max_submissions = stripslashes($fetch_settings['max_submissions']);
-		$stored_submissions = stripslashes($fetch_settings['stored_submissions']);
+		$email_subject = $this->stripslashes($fetch_settings['email_subject']);
+		$success_message = $this->stripslashes($fetch_settings['success_message']);
+		$max_submissions = $this->stripslashes($fetch_settings['max_submissions']);
+		$stored_submissions = $this->stripslashes($fetch_settings['stored_submissions']);
 	} else {
 		exit($TEXT['UNDER_CONSTRUCTION']);
 	}
@@ -231,11 +231,11 @@
 					} elseif (!is_array($_POST['field'.$field['field_id']])) {
 					$email_body .= '
 					
-	'.stripslashes($field['title']).': '.$_POST['field'.$field['field_id']].'\n';
+	'.$this->stripslashes($field['title']).': '.$_POST['field'.$field['field_id']].'\n';
 					} else {
 						$email_body .= '
 					
-	'.stripslashes($field['title']).': \n';
+	'.$this->stripslashes($field['title']).': \n';
 						foreach ($_POST['field'.$field['field_id']] as $k=>$v) {
 							$email_body .= '
 					
@@ -243,7 +243,7 @@
 						}
 					}
 				} elseif($field['required'] == 1) {
-				$required[] = stripslashes($field['title']);
+				$required[] = $this->stripslashes($field['title']);
 				}
 			}
 		}
Index: trunk/wb/modules/form/view_submission.php
===================================================================
--- trunk/wb/modules/form/view_submission.php	(revision 35)
+++ trunk/wb/modules/form/view_submission.php	(revision 36)
@@ -1,6 +1,6 @@
 <?php
 
-// $Id: view_submission.php,v 1.1 2005/03/28 04:35:39 rdjurovich Exp $
+// $Id$
 
 /*
 
@@ -75,7 +75,7 @@
 </tr>
 <tr>
 	<td colspan="2">
-		<?php echo stripslashes(str_replace('\n', '<br />', $submission['body'])); ?>
+		<?php echo $admin->stripslashes(str_replace('\n', '<br />', $submission['body'])); ?>
 	</td>
 </tr>
 </table>
Index: trunk/wb/modules/code/view.php
===================================================================
--- trunk/wb/modules/code/view.php	(revision 35)
+++ trunk/wb/modules/code/view.php	(revision 36)
@@ -1,6 +1,6 @@
 <?php
 
-// $Id: view.php,v 1.1.1.1 2005/01/30 10:32:22 rdjurovich Exp $
+// $Id$
 
 /*
 
@@ -26,7 +26,7 @@
 // Get content
 $get_content = $database->query("SELECT content FROM ".TABLE_PREFIX."mod_code WHERE section_id = '$section_id'");
 $fetch_content = $get_content->fetchRow();
-$content = stripslashes($fetch_content['content']);
+$content = $this->stripslashes($fetch_content['content']);
 eval($content);
 
 ?>
\ No newline at end of file
Index: trunk/wb/modules/code/modify.php
===================================================================
--- trunk/wb/modules/code/modify.php	(revision 35)
+++ trunk/wb/modules/code/modify.php	(revision 36)
@@ -1,6 +1,6 @@
 <?php
 
-// $Id: modify.php,v 1.2 2005/06/21 09:13:12 rdjurovich Exp $
+// $Id$
 
 /*
 
@@ -32,7 +32,7 @@
 $query = "SELECT content FROM ".TABLE_PREFIX."mod_code WHERE section_id = '$section_id'";
 $get_content = $database->query($query);
 $content = $get_content->fetchRow();
-$content = stripslashes(htmlspecialchars($content['content']));
+$content = $admin->stripslashes(htmlspecialchars($content['content']));
 
 // Insert vars
 $template->set_var(array(
Index: trunk/wb/modules/news/modify_post.php
===================================================================
--- trunk/wb/modules/news/modify_post.php	(revision 35)
+++ trunk/wb/modules/news/modify_post.php	(revision 36)
@@ -1,6 +1,6 @@
 <?php
 
-// $Id: modify_post.php,v 1.3 2005/06/21 09:11:44 rdjurovich Exp $
+// $Id$
 
 /*
 
@@ -51,12 +51,12 @@
 function initEditor() {
 	var editor = new HTMLArea("short");
 	editor.registerPlugin(ContextMenu);
-	editor.config.pageStyle = "body { <?php echo stripslashes(WYSIWYG_STYLE); ?> }";
+	editor.config.pageStyle = "body { <?php echo $admin->stripslashes(WYSIWYG_STYLE); ?> }";
 	editor.generate();
 	var editor = new HTMLArea("long");
 	editor.registerPlugin(ContextMenu);
 	editor.registerPlugin(TableOperations);
-	editor.config.pageStyle = "body { <?php echo stripslashes(WYSIWYG_STYLE); ?> }";
+	editor.config.pageStyle = "body { <?php echo $admin->stripslashes(WYSIWYG_STYLE); ?> }";
 	editor.generate();
 }
 </script>
@@ -72,7 +72,7 @@
 <tr>
 	<td width="80"><?php echo $TEXT['TITLE']; ?>:</td>
 	<td>
-		<input type="text" name="title" value="<?php echo stripslashes(htmlspecialchars($fetch_content['title'])); ?>" style="width: 100%;" maxlength="255" />
+		<input type="text" name="title" value="<?php echo $admin->stripslashes(htmlspecialchars($fetch_content['title'])); ?>" style="width: 100%;" maxlength="255" />
 	</td>
 </tr>
 <tr>
@@ -121,13 +121,13 @@
 <tr>
 	<td valign="top"><?php echo $TEXT['SHORT']; ?>:</td>
 	<td>
-		<textarea name="short" id="short" style="width: 100%; height: 135px;"><?php echo htmlspecialchars(stripslashes($fetch_content['short'])); ?></textarea>
+		<textarea name="short" id="short" style="width: 100%; height: 135px;"><?php echo htmlspecialchars($admin->stripslashes($fetch_content['short'])); ?></textarea>
 	</td>
 </tr>
 <tr>
 	<td valign="top"><?php echo $TEXT['LONG']; ?>:</td>
 	<td>
-		<textarea name="long" id="long" style="width: 100%; height: 300px;"><?php echo htmlspecialchars(stripslashes($fetch_content['long'])); ?></textarea>
+		<textarea name="long" id="long" style="width: 100%; height: 300px;"><?php echo htmlspecialchars($admin->stripslashes($fetch_content['long'])); ?></textarea>
 	</td>
 </tr>
 </table>
Index: trunk/wb/modules/news/comment_page.php
===================================================================
--- trunk/wb/modules/news/comment_page.php	(revision 35)
+++ trunk/wb/modules/news/comment_page.php	(revision 36)
@@ -1,6 +1,6 @@
 <?php
 
-// $Id: comment_page.php,v 1.1.1.1 2005/01/30 10:32:20 rdjurovich Exp $
+// $Id$
 
 /*
 
@@ -35,7 +35,7 @@
 	// Print comments page
 	$vars = array('[POST_TITLE]', '[ACTION_URL]');
 	$values = array(POST_TITLE, WB_URL.'/modules/news/submit_comment.php?page_id='.PAGE_ID.'&section_id='.SECTION_ID.'&post_id='.POST_ID);
-	echo str_replace($vars, $values, stripslashes($settings['comments_page']));
+	echo str_replace($vars, $values, $this->stripslashes($settings['comments_page']));
 }
 
 ?>
\ No newline at end of file
Index: trunk/wb/modules/news/modify_group.php
===================================================================
--- trunk/wb/modules/news/modify_group.php	(revision 35)
+++ trunk/wb/modules/news/modify_group.php	(revision 36)
@@ -1,6 +1,6 @@
 <?php
 
-// $Id: modify_group.php,v 1.2 2005/06/21 09:13:12 rdjurovich Exp $
+// $Id$
 
 /*
 
@@ -51,7 +51,7 @@
 <tr>
 	<td width="80"><?php echo $TEXT['TITLE']; ?>:</td>
 	<td>
-		<input type="text" name="title" value="<?php echo stripslashes(htmlspecialchars($fetch_content['title'])); ?>" style="width: 100%;" maxlength="255" />
+		<input type="text" name="title" value="<?php echo $admin->stripslashes(htmlspecialchars($fetch_content['title'])); ?>" style="width: 100%;" maxlength="255" />
 	</td>
 </tr>
 <tr>
Index: trunk/wb/modules/news/modify_settings.php
===================================================================
--- trunk/wb/modules/news/modify_settings.php	(revision 35)
+++ trunk/wb/modules/news/modify_settings.php	(revision 36)
@@ -1,6 +1,6 @@
 <?php
 
-// $Id: modify_settings.php,v 1.2 2005/04/01 07:52:58 rdjurovich Exp $
+// $Id$
 
 /*
 
@@ -53,31 +53,31 @@
 <tr>
 	<td class="setting_name" width="100"><?php echo $TEXT['HEADER']; ?>:</td>
 	<td class="setting_name">
-		<textarea name="header" style="width: 100%; height: 80px;"><?php echo stripslashes($fetch_content['header']); ?></textarea>
+		<textarea name="header" style="width: 100%; height: 80px;"><?php echo $admin->stripslashes($fetch_content['header']); ?></textarea>
 	</td>
 </tr>
 <tr>
 	<td class="setting_name"><?php echo $TEXT['POST'].' '.$TEXT['LOOP']; ?>:</td>
 	<td class="setting_name">
-		<textarea name="post_loop" style="width: 100%; height: 60px;"><?php echo stripslashes($fetch_content['post_loop']); ?></textarea>
+		<textarea name="post_loop" style="width: 100%; height: 60px;"><?php echo $admin->stripslashes($fetch_content['post_loop']); ?></textarea>
 	</td>
 </tr>
 <tr>
 	<td class="setting_name"><?php echo $TEXT['FOOTER']; ?>:</td>
 	<td class="setting_name">
-		<textarea name="footer" style="width: 100%; height: 80px;"><?php echo str_replace($raw, $friendly, stripslashes($fetch_content['footer'])); ?></textarea>
+		<textarea name="footer" style="width: 100%; height: 80px;"><?php echo str_replace($raw, $friendly, $admin->stripslashes($fetch_content['footer'])); ?></textarea>
 	</td>
 </tr>
 <tr>
 	<td class="setting_name"><?php echo $TEXT['POST_HEADER']; ?>:</td>
 	<td class="setting_name">
-		<textarea name="post_header" style="width: 100%; height: 60px;"><?php echo str_replace($raw, $friendly, stripslashes($fetch_content['post_header'])); ?></textarea>
+		<textarea name="post_header" style="width: 100%; height: 60px;"><?php echo str_replace($raw, $friendly, $admin->stripslashes($fetch_content['post_header'])); ?></textarea>
 	</td>
 </tr>
 <tr>
 	<td class="setting_name"><?php echo $TEXT['POST_FOOTER']; ?>:</td>
 	<td class="setting_name">
-		<textarea name="post_footer" style="width: 100%; height: 60px;"><?php echo str_replace($raw, $friendly, stripslashes($fetch_content['post_footer'])); ?></textarea>
+		<textarea name="post_footer" style="width: 100%; height: 60px;"><?php echo str_replace($raw, $friendly, $admin->stripslashes($fetch_content['post_footer'])); ?></textarea>
 	</td>
 </tr>
 <tr>
@@ -130,25 +130,25 @@
 <tr>
 	<td class="setting_name"><?php echo $TEXT['COMMENTS'].' '.$TEXT['HEADER']; ?>:</td>
 	<td class="setting_name">
-		<textarea name="comments_header" style="width: 100%; height: 60px;"><?php echo str_replace($raw, $friendly, stripslashes($fetch_content['comments_header'])); ?></textarea>
+		<textarea name="comments_header" style="width: 100%; height: 60px;"><?php echo str_replace($raw, $friendly, $admin->stripslashes($fetch_content['comments_header'])); ?></textarea>
 	</td>
 </tr>
 <tr>
 	<td class="setting_name"><?php echo $TEXT['COMMENTS'].' '.$TEXT['LOOP']; ?>:</td>
 	<td class="setting_name">
-		<textarea name="comments_loop" style="width: 100%; height: 60px;"><?php echo str_replace($raw, $friendly, stripslashes($fetch_content['comments_loop'])); ?></textarea>
+		<textarea name="comments_loop" style="width: 100%; height: 60px;"><?php echo str_replace($raw, $friendly, $admin->stripslashes($fetch_content['comments_loop'])); ?></textarea>
 	</td>
 </tr>
 <tr>
 	<td class="setting_name"><?php echo $TEXT['COMMENTS'].' '.$TEXT['FOOTER']; ?>:</td>
 	<td class="setting_name">
-		<textarea name="comments_footer" style="width: 100%; height: 60px;"><?php echo str_replace($raw, $friendly, stripslashes($fetch_content['comments_footer'])); ?></textarea>
+		<textarea name="comments_footer" style="width: 100%; height: 60px;"><?php echo str_replace($raw, $friendly, $admin->stripslashes($fetch_content['comments_footer'])); ?></textarea>
 	</td>
 </tr>
 <tr>
 	<td class="setting_name"><?php echo $TEXT['COMMENTS'].' '.$TEXT['PAGE']; ?>:</td>
 	<td class="setting_name">
-		<textarea name="comments_page" style="width: 100%; height: 80px;"><?php echo str_replace($raw, $friendly, stripslashes($fetch_content['comments_page'])); ?></textarea>
+		<textarea name="comments_page" style="width: 100%; height: 80px;"><?php echo str_replace($raw, $friendly, $admin->stripslashes($fetch_content['comments_page'])); ?></textarea>
 	</td>
 </tr>
 </table>
Index: trunk/wb/modules/news/modify_comment.php
===================================================================
--- trunk/wb/modules/news/modify_comment.php	(revision 35)
+++ trunk/wb/modules/news/modify_comment.php	(revision 36)
@@ -1,6 +1,6 @@
 <?php
 
-// $Id: modify_comment.php,v 1.2 2005/06/21 09:13:12 rdjurovich Exp $
+// $Id$
 
 /*
 
@@ -52,13 +52,13 @@
 <tr>
 	<td width="80"><?php echo $TEXT['TITLE']; ?>:</td>
 	<td>
-		<input type="text" name="title" value="<?php echo stripslashes(htmlspecialchars($fetch_content['title'])); ?>" style="width: 100%;" maxlength="255" />
+		<input type="text" name="title" value="<?php echo $admin->stripslashes(htmlspecialchars($fetch_content['title'])); ?>" style="width: 100%;" maxlength="255" />
 	</td>
 </tr>
 <tr>
 	<td valign="top"><?php echo $TEXT['COMMENT']; ?>:</td>
 	<td>
-		<textarea name="comment" style="width: 100%; height: 150px;"><?php echo stripslashes(htmlspecialchars($fetch_content['comment'])); ?></textarea>
+		<textarea name="comment" style="width: 100%; height: 150px;"><?php echo $admin->stripslashes(htmlspecialchars($fetch_content['comment'])); ?></textarea>
 	</td>
 </tr>
 </table>
Index: trunk/wb/modules/news/view.php
===================================================================
--- trunk/wb/modules/news/view.php	(revision 35)
+++ trunk/wb/modules/news/view.php	(revision 36)
@@ -1,6 +1,6 @@
 <?php
 
-// $Id: view.php,v 1.7 2005/06/21 09:11:27 rdjurovich Exp $
+// $Id$
 
 /*
 
@@ -55,7 +55,7 @@
 	while($group = $query_users->fetchRow()) {
 		// Insert user info into users array
 		$group_id = $group['group_id'];
-		$groups[$group_id]['title'] = stripslashes($group['title']);
+		$groups[$group_id]['title'] = $this->stripslashes($group['title']);
 		$groups[$group_id]['active'] = $group['active'];
 		if(file_exists(WB_PATH.MEDIA_DIRECTORY.'/.news/image'.$group_id.'.jpg')) {
 			$groups[$group_id]['image'] = WB_URL.MEDIA_DIRECTORY.'/.news/image'.$group_id.'.jpg';
@@ -82,9 +82,9 @@
 	$query_settings = $database->query("SELECT * FROM ".TABLE_PREFIX."mod_news_settings WHERE section_id = '$section_id'");
 	if($query_settings->numRows() > 0) {
 		$fetch_settings = $query_settings->fetchRow();
-		$setting_header = stripslashes($fetch_settings['header']);
-		$setting_post_loop = stripslashes($fetch_settings['post_loop']);
-		$setting_footer = stripslashes($fetch_settings['footer']);
+		$setting_header = $this->stripslashes($fetch_settings['header']);
+		$setting_post_loop = $this->stripslashes($fetch_settings['post_loop']);
+		$setting_footer = $this->stripslashes($fetch_settings['footer']);
 		$setting_posts_per_page = $fetch_settings['posts_per_page'];
 	} else {
 		$setting_header = '';
@@ -185,14 +185,14 @@
 				if($group_image == '') { $display_image = 'none'; } else { $display_image = ''; }
 				if($group_id == 0) { $display_group = 'none'; } else { $display_group = ''; }
 				// Replace [wblink--PAGE_ID--] with real link
-				$short = stripslashes($post['short']);
+				$short = $this->stripslashes($post['short']);
 				$this->preprocess($short);
 				// Replace vars with values
 				$vars = array('[PAGE_TITLE]', '[GROUP_ID]', '[GROUP_TITLE]', '[GROUP_IMAGE]', '[DISPLAY_GROUP]', '[DISPLAY_IMAGE]', '[TITLE]', '[SHORT]', '[LINK]', '[DATE]', '[TIME]', '[USER_ID]', '[USERNAME]', '[DISPLAY_NAME]', '[EMAIL]', '[TEXT_READ_MORE]');
 				if(isset($users[$uid]['username']) AND $users[$uid]['username'] != '') {
-					$values = array(PAGE_TITLE, $group_id, $group_title, $group_image, $display_group, $display_image, stripslashes($post['title']), $short, $post_link, $post_date, $post_time, $uid, $users[$uid]['username'], $users[$uid]['display_name'], $users[$uid]['email'], $TEXT['READ_MORE']);
+					$values = array(PAGE_TITLE, $group_id, $group_title, $group_image, $display_group, $display_image, $this->stripslashes($post['title']), $short, $post_link, $post_date, $post_time, $uid, $users[$uid]['username'], $users[$uid]['display_name'], $users[$uid]['email'], $TEXT['READ_MORE']);
 				} else {
-					$values = array(PAGE_TITLE, $group_id, $group_title, $group_image, $display_group, $display_image, stripslashes($post['title']), $short, $post_link, $post_date, $post_time, '', '', '', '', $TEXT['READ_MORE']);
+					$values = array(PAGE_TITLE, $group_id, $group_title, $group_image, $display_group, $display_image, $this->stripslashes($post['title']), $short, $post_link, $post_date, $post_time, '', '', '', '', $TEXT['READ_MORE']);
 				}
 				echo str_replace($vars, $values, $setting_post_loop);
 			}
@@ -212,11 +212,11 @@
 	$query_settings = $database->query("SELECT * FROM ".TABLE_PREFIX."mod_news_settings WHERE section_id = '$section_id'");
 	if($query_settings->numRows() > 0) {
 		$fetch_settings = $query_settings->fetchRow();
-		$setting_post_header = stripslashes($fetch_settings['post_header']);
-		$setting_post_footer = stripslashes($fetch_settings['post_footer']);
-		$setting_comments_header = stripslashes($fetch_settings['comments_header']);
-		$setting_comments_loop = stripslashes($fetch_settings['comments_loop']);
-		$setting_comments_footer = stripslashes($fetch_settings['comments_footer']);
+		$setting_post_header = $this->stripslashes($fetch_settings['post_header']);
+		$setting_post_footer = $this->stripslashes($fetch_settings['post_footer']);
+		$setting_comments_header = $this->stripslashes($fetch_settings['comments_header']);
+		$setting_comments_loop = $this->stripslashes($fetch_settings['comments_loop']);
+		$setting_comments_footer = $this->stripslashes($fetch_settings['comments_footer']);
 	} else {
 		$setting_post_header = '';
 		$setting_post_footer = '';
@@ -258,11 +258,11 @@
 			if($group_id == 0) { $display_group = 'none'; } else { $display_group = ''; }
 			$vars = array('[PAGE_TITLE]', '[GROUP_ID]', '[GROUP_TITLE]', '[GROUP_IMAGE]', '[DISPLAY_GROUP]', '[DISPLAY_IMAGE]', '[TITLE]', '[SHORT]', '[BACK]', '[DATE]', '[TIME]', '[USER_ID]', '[USERNAME]', '[DISPLAY_NAME]', '[EMAIL]');
 			if(isset($users[$uid]['username']) AND $users[$uid]['username'] != '') {
-				$values = array(PAGE_TITLE, $group_id, $group_title, $group_image, $display_group, $display_image, stripslashes($post['title']), stripslashes($post['short']), $page_link, $post_date, $post_time, $uid, $users[$uid]['username'], $users[$uid]['display_name'], $users[$uid]['email']);
+				$values = array(PAGE_TITLE, $group_id, $group_title, $group_image, $display_group, $display_image, $this->stripslashes($post['title']), $this->stripslashes($post['short']), $page_link, $post_date, $post_time, $uid, $users[$uid]['username'], $users[$uid]['display_name'], $users[$uid]['email']);
 			} else {
-				$values = array(PAGE_TITLE, $group_id, $group_title, $group_image, $display_group, $display_image, stripslashes($post['title']), stripslashes($post['short']), $page_link, $post_date, $post_time, '', '', '', '');
+				$values = array(PAGE_TITLE, $group_id, $group_title, $group_image, $display_group, $display_image, $this->stripslashes($post['title']), $this->stripslashes($post['short']), $page_link, $post_date, $post_time, '', '', '', '');
 			}
-			$post_long = stripslashes($post['long']);
+			$post_long = $this->stripslashes($post['long']);
 		}
 	} else {
 		header('Location: '.WB_URL.'/pages/');
@@ -290,8 +290,8 @@
 		if($query_comments->numRows() > 0) {
 			while($comment = $query_comments->fetchRow()) {
 				// Display Comments without slashes, but with new-line characters
-				$comment['comment'] = nl2br(stripslashes($comment['comment']));
-				$comment['title'] = stripslashes($comment['title']);
+				$comment['comment'] = nl2br($this->stripslashes($comment['comment']));
+				$comment['title'] = $this->stripslashes($comment['title']);
 				// Print comments loop
 				$commented_date = gmdate(DATE_FORMAT, $comment['commented_when']+TIMEZONE);
 				$commented_time = gmdate(TIME_FORMAT, $comment['commented_when']+TIMEZONE);
@@ -298,9 +298,9 @@
 				$uid = $comment['commented_by'];
 				$vars = array('[TITLE]','[COMMENT]','[DATE]','[TIME]','[USER_ID]','[USERNAME]','[DISPLAY_NAME]', '[EMAIL]');
 				if(isset($users[$uid]['username']) AND $users[$uid]['username'] != '') {
-					$values = array(stripslashes($comment['title']), stripslashes($comment['comment']), $commented_date, $commented_time, $uid, stripslashes($users[$uid]['username']), stripslashes($users[$uid]['display_name']), stripslashes($users[$uid]['email']));
+					$values = array($this->stripslashes($comment['title']), $this->stripslashes($comment['comment']), $commented_date, $commented_time, $uid, $this->stripslashes($users[$uid]['username']), $this->stripslashes($users[$uid]['display_name']), $this->stripslashes($users[$uid]['email']));
 				} else {
-					$values = array(stripslashes($comment['title']), stripslashes($comment['comment']), $commented_date, $commented_time, '0', strtolower($TEXT['UNKNOWN']), $TEXT['UNKNOWN'], '');
+					$values = array($this->stripslashes($comment['title']), $this->stripslashes($comment['comment']), $commented_date, $commented_time, '0', strtolower($TEXT['UNKNOWN']), $TEXT['UNKNOWN'], '');
 				}
 				echo str_replace($vars, $values, $setting_comments_loop);
 			}
Index: trunk/wb/modules/news/modify.php
===================================================================
--- trunk/wb/modules/news/modify.php	(revision 35)
+++ trunk/wb/modules/news/modify.php	(revision 36)
@@ -1,6 +1,6 @@
 <?php
 
-// $Id: modify.php,v 1.2 2005/04/05 07:20:41 rdjurovich Exp $
+// $Id$
 
 /*
 
@@ -65,7 +65,7 @@
 			</td>
 			<td>
 				<a href="<?php echo WB_URL; ?>/modules/news/modify_post.php?page_id=<?php echo $page_id; ?>&section_id=<?php echo $section_id; ?>&post_id=<?php echo $post['post_id']; ?>">
-					<?php echo stripslashes($post['title']); ?>
+					<?php echo $admin->stripslashes($post['title']); ?>
 				</a>
 			</td>
 			<td width="180">
@@ -74,7 +74,7 @@
 				$query_title = $database->query("SELECT title FROM ".TABLE_PREFIX."mod_news_groups WHERE group_id = '".$post['group_id']."'");
 				if($query_title->numRows() > 0) {
 					$fetch_title = $query_title->fetchRow();
-					echo stripslashes($fetch_title['title']);
+					echo $admin->stripslashes($fetch_title['title']);
 				} else {
 					echo $TEXT['NONE'];
 				}
Index: trunk/wb/modules/admin.php
===================================================================
--- trunk/wb/modules/admin.php	(revision 35)
+++ trunk/wb/modules/admin.php	(revision 36)
@@ -126,7 +126,7 @@
 $template->set_block('page', 'main_block', 'main');
 $template->set_var(array(
 								'PAGE_ID' => $results_array['page_id'],
-								'PAGE_TITLE' => stripslashes($results_array['page_title']),
+								'PAGE_TITLE' => $admin->stripslashes($results_array['page_title']),
 								'MODIFIED_BY' => $user['display_name'],
 								'MODIFIED_BY_USERNAME' => $user['username'],
 								'MODIFIED_WHEN' => $modified_ts,
Index: trunk/wb/framework/class.admin.php
===================================================================
--- trunk/wb/framework/class.admin.php	(revision 35)
+++ trunk/wb/framework/class.admin.php	(revision 36)
@@ -93,7 +93,7 @@
 													'SECTION_NAME' => $MENU[strtoupper($this->section_name)],
 													'INTERFACE_DIR' => ADMIN_URL.'/interface',
 													'BODY_TAGS' => $body_tags,
-													'WEBSITE_TITLE' => stripslashes($title['value']),
+													'WEBSITE_TITLE' => $this->stripslashes($title['value']),
 													'TEXT_ADMINISTRATION' => $TEXT['ADMINISTRATION'],
 													'VERSION' => VERSION
 													)
Index: trunk/wb/framework/class.wb.php
===================================================================
--- trunk/wb/framework/class.wb.php	(revision 35)
+++ trunk/wb/framework/class.wb.php	(revision 36)
@@ -73,6 +73,14 @@
 		}
 	}
 
+	function stripslashes($input) {
+		if ( !get_magic_quotes_gpc() || ( !is_string($input) ) ) {
+			return $input;
+		}
+		$output = stripslashes($input);
+		return $output;
+	}
+
 	// Get POST data
 	function get_post($field) {
 		if(isset($_POST[$field])) {
@@ -131,7 +139,7 @@
 
 	// Get the current users display name
 	function get_display_name() {
-		return stripslashes($_SESSION['DISPLAY_NAME']);
+		return $this->stripslashes($_SESSION['DISPLAY_NAME']);
 	}
 
 	// Get the current users email address
Index: trunk/wb/framework/class.frontend.php
===================================================================
--- trunk/wb/framework/class.frontend.php	(revision 35)
+++ trunk/wb/framework/class.frontend.php	(revision 36)
@@ -72,7 +72,7 @@
 				$content = fread($handle, filesize($filename));
 				fclose($handle);
 				$this->preprocess($content);
-				echo stripslashes($content);
+				echo $this->stripslashes($content);
 				return false;
 			}
 		}
@@ -140,10 +140,10 @@
 			define('PAGE_ID', $this->page['page_id']);
 			$this->page_id=$this->page['page_id'];
 			// Page Title
-			define('PAGE_TITLE', stripslashes($this->page['page_title']));
+			define('PAGE_TITLE', $this->stripslashes($this->page['page_title']));
 			$this->page_title=PAGE_TITLE;
 			// Menu Title
-			$menu_title = stripslashes($this->page['menu_title']);
+			$menu_title = $this->stripslashes($this->page['menu_title']);
 			if($menu_title != '') {
 				define('MENU_TITLE', $menu_title);
 			} else {
@@ -252,7 +252,7 @@
 		while($setting = $get_settings->fetchRow()) {
 			switch($setting['name']) {
 				case 'title':
-					define('WEBSITE_TITLE', stripslashes($setting['value']));
+					define('WEBSITE_TITLE', $this->stripslashes($setting['value']));
 					$this->website_title=WEBSITE_TITLE;
 				break;
 				case 'description':
@@ -259,24 +259,24 @@
 					if($page_description != '') {
 						define('WEBSITE_DESCRIPTION', $page_description);
 					} else {
-						define('WEBSITE_DESCRIPTION', stripslashes($setting['value']));
+						define('WEBSITE_DESCRIPTION', $this->stripslashes($setting['value']));
 					}
 					$this->website_description=WEBSITE_DESCRIPTION;
 				break;
 				case 'keywords':
 					if($page_keywords != '') {
-						define('WEBSITE_KEYWORDS', stripslashes($setting['value']).' '.$page_keywords);
+						define('WEBSITE_KEYWORDS', $this->stripslashes($setting['value']).' '.$page_keywords);
 					} else {
-						define('WEBSITE_KEYWORDS', stripslashes($setting['value']));
+						define('WEBSITE_KEYWORDS', $this->stripslashes($setting['value']));
 					}
 					$this->website_keywords=WEBSITE_KEYWORDS;
 				break;
 				case 'header':
-					define('WEBSITE_HEADER', stripslashes($setting['value']));
+					define('WEBSITE_HEADER', $this->stripslashes($setting['value']));
 					$this->website_header=WEBSITE_HEADER;
 				break;
 				case 'footer':
-					define('WEBSITE_FOOTER', stripslashes($setting['value']));
+					define('WEBSITE_FOOTER', $this->stripslashes($setting['value']));
 					$this->website_footer=WEBSITE_FOOTER;
 				break;
 			}
@@ -390,7 +390,7 @@
 	            $link = $this->page_link($page['link']);
 	         }
 	         // Create values
-	         $values = array($class,'<a href="'.$link.'" target="'.$page['target'].'" '.$class.'>', '</a>', stripslashes($page['menu_title']), stripslashes($page['page_title']));
+	         $values = array($class,'<a href="'.$link.'" target="'.$page['target'].'" '.$class.'>', '</a>', $this->stripslashes($page['menu_title']), $this->stripslashes($page['page_title']));
 	         // Replace vars with value and print
 	         echo "\n".str_replace($vars, $values, $this->menu_item_template);
 	         // Generate sub-menu
Index: trunk/wb/framework/functions.php
===================================================================
--- trunk/wb/framework/functions.php	(revision 35)
+++ trunk/wb/framework/functions.php	(revision 36)
@@ -630,8 +630,8 @@
 	$parent = $results_array['parent'];
 	$level = $results_array['level'];
 	$link = $results_array['link'];
-	$page_title = stripslashes($results_array['page_title']);
-	$menu_title = stripslashes($results_array['menu_title']);
+	$page_title = $admin->stripslashes($results_array['page_title']);
+	$menu_title = $admin->stripslashes($results_array['menu_title']);
 	
 	// Get the sections that belong to the page
 	$query_sections = $database->query("SELECT section_id,module FROM ".TABLE_PREFIX."sections WHERE page_id = '$page_id'");
