[geeklog-hg] geeklog: Merged with upstream
geeklog-cvs at lists.geeklog.net
geeklog-cvs at lists.geeklog.net
Wed Jun 19 20:37:11 EDT 2013
changeset 9107:38667aa3a534
url: http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/rev/38667aa3a534
user: Tom <websitemaster at cogeco.net>
date: Wed Jun 19 20:36:47 2013 -0400
description:
Merged with upstream
diffstat:
public_html/lib-common.php | 10 +++++++---
system/classes/story.class.php | 15 +++++++++++++++
2 files changed, 22 insertions(+), 3 deletions(-)
diffs (55 lines):
diff -r 60c03d473a2b -r 38667aa3a534 public_html/lib-common.php
--- a/public_html/lib-common.php Wed Jun 19 20:34:51 2013 -0400
+++ b/public_html/lib-common.php Wed Jun 19 20:36:47 2013 -0400
@@ -3804,12 +3804,16 @@
*/
function COM_handleCode( $str )
{
- $search = array( '&', '\\', '<', '>', '[', ']' );
- $replace = array( '&', '\', '<', '>', '[', ']' );
+
+ // note that bug fixes are included in this function (Issue #0001619)
+ // '\' -> '\' -> '\'
+ // '$' -> '$' -> '$'
+ $search = array('&', '\', '$', '\\', '<', '>', '[', ']' );
+ $replace = array('&', '\', '$', '\', '<', '>', '[', ']');
$str = str_replace( $search, $replace, $str );
- return( $str );
+ return $str;
}
/**
diff -r 60c03d473a2b -r 38667aa3a534 system/classes/story.class.php
--- a/system/classes/story.class.php Wed Jun 19 20:34:51 2013 -0400
+++ b/system/classes/story.class.php Wed Jun 19 20:36:47 2013 -0400
@@ -421,6 +421,9 @@
// Store the original SID
$this->_originalSid = $this->_sid;
+
+ // Fix incorrect strings
+ $this->_fixData();
}
/**
@@ -2219,6 +2222,18 @@
}
}
+ /**
+ * 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