[geeklog-cvs] geeklog: Need to escape curly braces in the block content (for b...

geeklog-cvs at lists.geeklog.net geeklog-cvs at lists.geeklog.net
Wed Jan 6 12:43:56 EST 2010


changeset 7584:3922e2c5fce5
url:  http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/rev/3922e2c5fce5
user: Dirk Haun <dirk at haun-online.de>
date: Wed Jan 06 10:36:17 2010 +0100
description:
Need to escape curly braces in the block content (for bug #0001057)

diffstat:

 public_html/admin/block.php |  18 +++++++++++-------
 1 files changed, 11 insertions(+), 7 deletions(-)

diffs (35 lines):

diff -r fce855ec235f -r 3922e2c5fce5 public_html/admin/block.php
--- a/public_html/admin/block.php	Sun Jan 03 20:13:14 2010 +0100
+++ b/public_html/admin/block.php	Wed Jan 06 10:36:17 2010 +0100
@@ -8,7 +8,7 @@
 // |                                                                           |
 // | Geeklog block administration.                                             |
 // +---------------------------------------------------------------------------+
-// | Copyright (C) 2000-2009 by the following authors:                         |
+// | Copyright (C) 2000-2010 by the following authors:                         |
 // |                                                                           |
 // | Authors: Tony Bibbs        - tony AT tonybibbs DOT com                    |
 // |          Mark Limburg      - mlimburg AT users DOT sourceforge DOT net    |
@@ -362,12 +362,16 @@
     } else {
         $block_templates->set_var ('block_rdfupdated', $A['rdfupdated']);
     }
-    $block_templates->set_var ('lang_normalblockoptions', $LANG21[16]);
-    $block_templates->set_var ('lang_blockcontent', $LANG21[17]);
-    $block_templates->set_var ('lang_autotags', $LANG21[66]);
-    $block_templates->set_var ('lang_use_autotags', $LANG21[67]);
-    $block_templates->set_var ('block_content',
-                               htmlspecialchars (stripslashes ($A['content'])));
+    $block_templates->set_var('lang_normalblockoptions', $LANG21[16]);
+    $block_templates->set_var('lang_blockcontent', $LANG21[17]);
+    $block_templates->set_var('lang_autotags', $LANG21[66]);
+    $block_templates->set_var('lang_use_autotags', $LANG21[67]);
+
+    $content = htmlspecialchars(stripslashes($A['content']));
+    $content = str_replace(array('{', '}'), array('{', '}'),
+                           $content);
+    $block_templates->set_var('block_content', $content);
+
     if ($A['allow_autotags'] == 1) {
         $block_templates->set_var ('allow_autotags', 'checked="checked"');
     } else {



More information about the geeklog-cvs mailing list