[geeklog-cvs] geeklog: Replaced Use of urlencode with rawurlencocde for links ...

geeklog-cvs at lists.geeklog.net geeklog-cvs at lists.geeklog.net
Tue Mar 22 14:01:37 EDT 2011


changeset 8194:abf0b745c761
url:  http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/rev/abf0b745c761
user: Tom <websitemaster at cogeco.net>
date: Tue Mar 22 14:00:48 2011 -0400
description:
Replaced Use of urlencode with rawurlencocde for links plugin Bug#1173

diffstat:

 plugins/links/functions.inc |  14 +++++++-------
 public_html/links/index.php |  10 +++++-----
 2 files changed, 12 insertions(+), 12 deletions(-)

diffs (107 lines):

diff -r 7621b2840340 -r abf0b745c761 plugins/links/functions.inc
--- a/plugins/links/functions.inc	Mon Mar 21 20:51:07 2011 +0000
+++ b/plugins/links/functions.inc	Tue Mar 22 14:00:48 2011 -0400
@@ -1109,7 +1109,7 @@
     if ($table == $_TABLES['linksubmission']) {
         $mailbody .= "$LANG_LINKS[10] <{$_CONF['site_admin_url']}/moderation.php>\n\n";
     } else {
-        $mailbody .= "$LANG_LINKS[114] <{$_CONF['site_url']}/links/index.php?category=" . urlencode ($A['category']) . ">\n\n";
+        $mailbody .= "$LANG_LINKS[114] <{$_CONF['site_url']}/links/index.php?category=" . rawurlencode ($A['category']) . ">\n\n";
     }
     $mailsubject = $_CONF['site_name'] . ' ' . $LANG_LINKS_SUBMIT[11];
 
@@ -1174,7 +1174,7 @@
                 }
                 $cat = COM_createLink($A['category'],
                         "{$_CONF['site_url']}/links/index.php?category="
-                        . urlencode($A['cid']));
+                        . rawurlencode($A['cid']));
                 $retval = "<span style=\"padding-left:{$indent}px;\">$cat</span>";
                 break;
                 break;
@@ -1200,7 +1200,7 @@
                 if ($access == 3) {
                     $retval = COM_createLink(
                         $icon_arr['edit'],
-                        "{$_CONF['site_admin_url']}/plugins/links/category.php?mode=edit&cid=" . urlencode($A['cid'])
+                        "{$_CONF['site_admin_url']}/plugins/links/category.php?mode=edit&cid=" . rawurlencode($A['cid'])
                     );
                 }
                 break;
@@ -1215,14 +1215,14 @@
                 $indent = ($A['indent'] - 1) * 20;
                 $cat = COM_createLink($A['category'],
                         "{$_CONF['site_url']}/links/index.php?category="
-                        . urlencode($A['cid']));
+                        . rawurlencode($A['cid']));
                 $retval = "<span style=\"padding-left:{$indent}px;\">$cat</span>";
                 break;
             case 'addchild';
                 if ($access == 3) {
                     $retval = COM_createLink(
                         $icon_arr['addchild'],
-                        "{$_CONF['site_admin_url']}/plugins/links/category.php?mode=edit&pid=" . urlencode($A['cid'])
+                        "{$_CONF['site_admin_url']}/plugins/links/category.php?mode=edit&pid=" . rawurlencode($A['cid'])
                     );
                 }
                 break;
@@ -1423,7 +1423,7 @@
             if ($cid != $c) {
                 $content = stripslashes($A['category']);
                 $url = $_CONF['site_url'] . '/links/index.php?category='
-                                          . urlencode($A['cid']);
+                                          . rawurlencode($A['cid']);
                 $breadcrumb = COM_createLink($content, $url) . $separator
                             . $breadcrumb;
             } else {
@@ -1507,7 +1507,7 @@
                 $A = DB_fetchArray($result);
                 $content = stripslashes($A['category']);
                 $url = $_CONF['site_url'] . '/links/index.php?category='
-                                          . urlencode($A['cid']);
+                                          . rawurlencode($A['cid']);
                 $retval .= COM_createLink($content, $url) . '<br' . XHTML . '>';
             }
         }
diff -r 7621b2840340 -r abf0b745c761 public_html/links/index.php
--- a/public_html/links/index.php	Mon Mar 21 20:51:07 2011 +0000
+++ b/public_html/links/index.php	Tue Mar 22 14:00:48 2011 -0400
@@ -212,7 +212,7 @@
                     $linklist->set_var ('category_description', '');
                 }
                 $linklist->set_var ('category_link', $_CONF['site_url'] .
-                    '/links/index.php?category=' . urlencode ($C['cid']));
+                    '/links/index.php?category=' . rawurlencode ($C['cid']));
                 $linklist->set_var ('category_count', $display_count);
                 $linklist->set_var ('width', floor (100 / $_LI_CONF['linkcols']));
                 if (!empty($cid) && ($cid == $C['cid'])) {
@@ -243,7 +243,7 @@
 
     $linklist->set_var('cid', $cid);
     $linklist->set_var('cid_plain', $cid);
-    $linklist->set_var('cid_encoded', urlencode($cid));
+    $linklist->set_var('cid_encoded', rawurlencode($cid));
     $linklist->set_var('lang_addalink', $LANG_LINKS[116]);
 
     // Build SQL for links
@@ -325,7 +325,7 @@
         }
         if ($pages > 0) {
             if (($_LI_CONF['linkcols'] > 0) && !empty($currentcid)) {
-                $catlink = '?category=' . urlencode($currentcid);
+                $catlink = '?category=' . rawurlencode($currentcid);
             } else {
                 $catlink = '';
             }
@@ -363,9 +363,9 @@
 
     $template->set_var('link_url', $url);
     $template->set_var('link_actual_url', $actualUrl);
-    $template->set_var('link_actual_url_encoded', urlencode($actualUrl));
+    $template->set_var('link_actual_url_encoded', rawurlencode($actualUrl));
     $template->set_var('link_name', $title);
-    $template->set_var('link_name_encoded', urlencode($title));
+    $template->set_var('link_name_encoded', rawurlencode($title));
     $template->set_var('link_hits', COM_numberFormat($A['hits']));
     $template->set_var('link_description',
                        PLG_replaceTags( nl2br(stripslashes($A['description'])) ));



More information about the geeklog-cvs mailing list