[pLog-svn] r2354 - plog/branches/plog-1.0.2/class/data
oscar at devel.plogworld.net
oscar at devel.plogworld.net
Sun Jul 24 08:18:58 GMT 2005
Author: oscar
Date: 2005-07-24 08:18:55 +0000 (Sun, 24 Jul 2005)
New Revision: 2354
Modified:
plog/branches/plog-1.0.2/class/data/kses.class.php
plog/branches/plog-1.0.2/class/data/textfilter.class.php
Log:
fixed issue 658 (http://bugs.plogworld.net/view.php?id=658) and moved the include for kses
to the only method that uses to save some memory.
Modified: plog/branches/plog-1.0.2/class/data/kses.class.php
===================================================================
--- plog/branches/plog-1.0.2/class/data/kses.class.php 2005-07-21 02:55:21 UTC (rev 2353)
+++ plog/branches/plog-1.0.2/class/data/kses.class.php 2005-07-24 08:18:55 UTC (rev 2354)
@@ -81,7 +81,7 @@
$string = stripslashes($string);
}
$string = $this->_no_null($string);
- $string = $this->_js_entities($string);
+ $string = $this->_js_entities($string);
$string = $this->_normalize_entities($string);
$string = $this->_hook($string);
$string = $this->_split($string);
@@ -395,7 +395,7 @@
if (!is_array($current))
{
- # there are no checks
+ # there are no checks
$attr2 .= ' '.$arreach['whole'];
}
else
@@ -569,7 +569,7 @@
'whole' => $attrname,
'vless' => 'y'
);
- }
+ }
return $attrarr;
} # function _hair
@@ -590,7 +590,6 @@
$string2 = $string;
$string = $this->_bad_protocol_once($string);
} # while
-
return $string;
} # function _bad_protocol
@@ -620,6 +619,12 @@
$string2 = preg_replace('/\s/', '', $string);
$string2 = $this->_no_null($string2);
$string2 = strtolower($string2);
+
+ //
+ // bug http://bugs.plogworld.net/view.php?id=658
+ // somehow every other CSS attribute is allowed except "margin"... go figure!
+ //
+ $this->allowed_protocols[] = "margin";
$allowed = false;
foreach ($this->allowed_protocols as $one_protocol)
Modified: plog/branches/plog-1.0.2/class/data/textfilter.class.php
===================================================================
--- plog/branches/plog-1.0.2/class/data/textfilter.class.php 2005-07-21 02:55:21 UTC (rev 2353)
+++ plog/branches/plog-1.0.2/class/data/textfilter.class.php 2005-07-24 08:18:55 UTC (rev 2354)
@@ -9,7 +9,6 @@
include_once( PLOG_CLASS_PATH."class/object/object.class.php" );
include_once( PLOG_CLASS_PATH."class/config/config.class.php" );
- include_once( PLOG_CLASS_PATH."class/data/kses.class.php" );
include_once( PLOG_CLASS_PATH."class/data/stringutils.class.php" );
/**
@@ -412,6 +411,7 @@
// use kses in the "xhtml converter" mode
$config =& Config::getConfig();
if( $config->getValue( "xhtml_converter_enabled" )) {
+ include_once( PLOG_CLASS_PATH."class/data/kses.class.php" );
$kses = new kses( true, $config->getValue( "xhtml_converter_aggresive_mode_enabled"));
$result = $kses->Parse( $string );
More information about the pLog-svn
mailing list