[geeklog-hg] geeklog: Fixed the characters '\' and '$' in edit forms are not ...

geeklog-cvs at lists.geeklog.net geeklog-cvs at lists.geeklog.net
Thu Jul 4 09:47:55 EDT 2013


changeset 9163:7373f5e0ca9f
url:  http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/rev/7373f5e0ca9f
user: dengen <taharaxp at gmail.com>
date: Thu Jul 04 22:47:04 2013 +0900
description:
Fixed the characters '\' and '$' in edit forms are not handled correctly (bug #0001651)

diffstat:

 system/classes/story.class.php |  7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diffs (17 lines):

diff -r 12833ad7e3f4 -r 7373f5e0ca9f system/classes/story.class.php
--- a/system/classes/story.class.php	Thu Jul 04 09:11:42 2013 -0400
+++ b/system/classes/story.class.php	Thu Jul 04 22:47:04 2013 +0900
@@ -1822,6 +1822,13 @@
     function _editUnescape($in)
     {
         if (($this->_postmode == 'html') || ($this->_postmode == 'wikitext')) {
+
+            // replace any \ with \ (see COM_checkHTML)
+            $in = str_replace('\', '\\', $in);
+
+            // Replace any $ with $ (see COM_checkHTML)
+            $in = str_replace('$', '$', $in);
+
             /* Raw and code blocks need entity decoding. Other areas do not.
              * otherwise, annoyingly, < will end up as < on preview 1, on
              * preview 2 it'll be stripped by KSES. Can't beleive I missed that



More information about the geeklog-cvs mailing list