Permalink
Browse files

Fix for #564

  • Loading branch information...
1 parent ef6cfa8 commit 6acfed0cc3430b61ab905afc9943ae8887028d1c Andrew Smith committed Jun 28, 2009
Showing with 11 additions and 9 deletions.
  1. +1 −1 addons/ajax/gtdajax.js
  2. +1 −1 editCat.inc.php
  3. +5 −3 gtdfuncs.inc.php
  4. +1 −1 preferences.php
  5. +2 −2 reportContext.php
  6. +1 −1 version.php
@@ -120,7 +120,7 @@ function Live_field(source,inputtype,savefunc,resetfunc,expandfunc) {
this.Set=function(save) { // function to save or reset this particular field
jsource.replaceWith(old);
if (save!==false) {
- var cleantext=save.replace(/\\/g,'');
+ var cleantext=save;//.replace(/\\/g,''); // TOFIX - this was in here for a reason, but I can't remember what that was!
switch(inputtype) {
//--------------------------------------------------
case 'text':
View
@@ -74,4 +74,4 @@
if ($thiscat)
$title.=': '.$thiscat['name'];
else if ($id)
- $title=makeClean("Failed to find $field with id=$id");
+ $title=makeclean("Failed to find $field with id=$id");
View
@@ -178,12 +178,14 @@ function escapeChars($str) {
return $str;
}
//-------------------------------------------------
-function makeClean($textIn) {
+function makeclean($textIn,$stripSlashes=false) {
if (is_array($textIn)) {
$cleaned=array();
- foreach ($textIn as $line) $cleaned[]=makeClean($line);
+ foreach ($textIn as $line) $cleaned[]=makeclean($line);
} else {
- $cleaned=htmlentities(stripslashes($textIn),ENT_QUOTES,$_SESSION['config']['charset']);
+ $cleaned=htmlentities(
+ ($stripSlashes) ? stripslashes($textIn) : $textIn,
+ ENT_QUOTES,$_SESSION['config']['charset']);
}
return $cleaned;
}
View
@@ -119,7 +119,7 @@ function makeOptionsTab($array,$values,$tabname,$varprefix='',$textsize=10) {
*/
$array=array();
foreach ($addons as $addon) {
- $desc=makeClean(@file_get_contents($_SESSION['addonsdir'].$addon.'/description'));
+ $desc=makeclean(@file_get_contents($_SESSION['addonsdir'].$addon.'/description'));
if (!empty($desc)) $desc="($desc)";
$array[]=array($addon,'checkbox',"<b>$addon</b> $desc");
}
View
@@ -64,12 +64,12 @@
if (!$runningtotals["c$cid"]) continue;
echo "<div id='dc$cid'>\n"
,"<a id='c$cid'></a>\n"
- ,"<h2>Context:&nbsp;",makeClean($cname),"</h2>\n";
+ ,"<h2>Context:&nbsp;",makeclean($cname),"</h2>\n";
foreach ($timeframeNames as $tid => $tname) {
if (isset($matrixout[$cid][$tid])) {
echo "<div class='t{$tid}'>\n"
,"<a id='c{$cid}t{$tid}'></a>\n"
- ,"<h3>Time Context:&nbsp;",makeClean($tname),"</h3>\n";
+ ,"<h3>Time Context:&nbsp;",makeclean($tname),"</h3>\n";
?>
<form action="processItems.php" method="post">
<table class="datatable sortable" summary="table of actions"
View
@@ -5,7 +5,7 @@
if (array_key_exists('addons',$_SESSION)) {
foreach ($_SESSION['addons'] as $key=>$val) if ($val===true) {
$ver=@file_get_contents($_SESSION['addonsdir'].$key.'/version');
- $addons[makeclean($key)]=makeClean($ver);
+ $addons[makeclean($key)]=makeclean($ver);
}
}
?>

0 comments on commit 6acfed0

Please sign in to comment.