[geeklog-hg] geeklog: Fixed again a bug #0001619. (see changeset 7f57f14d9351)
geeklog-cvs at lists.geeklog.net
geeklog-cvs at lists.geeklog.net
Sat Jun 29 00:30:40 EDT 2013
changeset 9148:2b8806b490e6
url: http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/rev/2b8806b490e6
user: dengen <taharaxp at gmail.com>
date: Sat Jun 29 13:30:08 2013 +0900
description:
Fixed again a bug #0001619. (see changeset 7f57f14d9351)
The cause was to have replaced to HtmLawed from Kses. (see changeset 2bc8e6300729)
Because this change is not yet published, I have deleted the changes to the story.class.php.
diffstat:
public_html/lib-common.php | 19 +++++++++----------
system/classes/story.class.php | 15 ---------------
2 files changed, 9 insertions(+), 25 deletions(-)
diffs (79 lines):
diff -r 518070aa96c2 -r 2b8806b490e6 public_html/lib-common.php
--- a/public_html/lib-common.php Fri Jun 28 13:18:39 2013 -0400
+++ b/public_html/lib-common.php Sat Jun 29 13:30:08 2013 +0900
@@ -3843,12 +3843,8 @@
*/
function COM_handleCode( $str )
{
-
- // note that bug fixes are included in this function (Issue #0001619)
- // '\' -> '\' -> '\'
- // '$' -> '$' -> '$'
- $search = array('&', '\', '$', '\\', '<', '>', '[', ']' );
- $replace = array('&', '\', '$', '\', '<', '>', '[', ']');
+ $search = array('&', '<', '>', '[', ']' );
+ $replace = array('&', '<', '>', '[', ']');
$str = str_replace( $search, $replace, $str );
@@ -3870,14 +3866,11 @@
{
global $_CONF, $_USER;
- // replace any \ with \ (HTML equiv)
- $str = str_replace('\\', '\', COM_stripslashes($str) );
+ $str = COM_stripslashes($str);
// Get rid of any newline characters
$str = str_replace("\n", '', $str);
- // Replace any $ with $ (HTML equiv)
- $str = str_replace( '$', '$', $str );
// handle [code] ... [/code]
do
{
@@ -3940,6 +3933,12 @@
}
while( $start_pos !== false );
+ // replace any \ with \ (HTML equiv)
+ $str = str_replace( '\\', '\', $str );
+
+ // Replace any $ with $ (HTML equiv)
+ $str = str_replace( '$', '$', $str );
+
$has_skiphtmlfilterPermissions = SEC_hasRights ('htmlfilter.skip');
if ($has_skiphtmlfilterPermissions || (isset( $_CONF['skip_html_filter_for_root'] ) &&
diff -r 518070aa96c2 -r 2b8806b490e6 system/classes/story.class.php
--- a/system/classes/story.class.php Fri Jun 28 13:18:39 2013 -0400
+++ b/system/classes/story.class.php Sat Jun 29 13:30:08 2013 +0900
@@ -421,9 +421,6 @@
// Store the original SID
$this->_originalSid = $this->_sid;
-
- // Fix incorrect strings
- $this->_fixData();
}
/**
@@ -2222,18 +2219,6 @@
}
}
- /**
- * replace incorrect strings that have already been stored in the database
- * (Issue #0001619)
- */
- function _fixData()
- {
- $search = array('\', '$');
- $replace = array('\', '$');
- $this->_introtext = str_replace($search, $replace, $this->_introtext);
- $this->_bodytext = str_replace($search, $replace, $this->_bodytext);
- }
-
// End Private Methods.
/**************************************************************************/
More information about the geeklog-cvs
mailing list