tags 294106 + fixed-upstream patch
thanks

        Hi,

"Karsten M. Self" <kmself@ix.netcom.com> - Mon, Feb 07, 2005:

> Bookmark sections with one or more slash '/' characters in their name
> break when attempting to view the sub-portal section.

 This has been fixed upstream, the fix will be available with next
 release.  I attach the patch for your convenience.

   Regards,

-- 
Loïc Minier <[EMAIL PROTECTED]>
"Neutral President: I have no strong feelings one way or the other."
* added files

    {arch}/galeon/galeon--mainline/galeon--mainline--2.0/[EMAIL 
PROTECTED]/patch-log/patch-195

* modified files

--- orig/ChangeLog
+++ mod/ChangeLog
@@ -1,5 +1,12 @@
 2005-02-11  Crispin Flowerday  <[EMAIL PROTECTED]>
 
+       * mozilla/MyportalProtocolHandler.h
+       * mozilla/MyportalProtocolHandler.cpp: Correctly escape
+       '/' chars so that folder with a '/' in them get displayed 
+       properly. Fixes bug #166638
+
+2005-02-11  Crispin Flowerday  <[EMAIL PROTECTED]>
+
        * src/galeon-action-location.c: Don't crash if there isn't
        a location entry (debian bug 294786)
 


--- orig/mozilla/MyportalProtocolHandler.cpp
+++ mod/mozilla/MyportalProtocolHandler.cpp
@@ -528,9 +528,7 @@ GMyportalProtocolHandler::RenderFromPath
 
                Write ("<a href=\"");
 
-               char *escaped = gnome_vfs_escape_host_and_path_string 
(prefix->str);
-               WriteHTMLEscape (escaped);
-               g_free (escaped);
+               WriteHTMLEscape (prefix->str);
 
                Write ("\">");
                WriteHTMLEscape (root->name);
@@ -557,9 +555,11 @@ GMyportalProtocolHandler::RenderFromPath
                        break;
                }
 
-               g_string_append (prefix, name);
+               char *escaped = gnome_vfs_escape_string (name);
+               g_string_append (prefix, escaped);
                g_string_append_c (prefix, '/');
                g_free (name);
+               g_free (escaped);
                
                count++;
                root = GB_BOOKMARK (match->data);
@@ -613,7 +613,7 @@ GMyportalProtocolHandler::RenderItem (Gb
        } 
        else if (GB_IS_SMART_SITE (b))
        {
-               RenderSmartURL (GB_SMART_SITE (b), prefix);
+               RenderSmartURL (GB_SMART_SITE (b));
        }
        else if (GB_IS_SITE (b))
        {
@@ -677,16 +677,16 @@ GMyportalProtocolHandler::RenderFolder (
        }
        else
        {
-               newprefix = g_strconcat (prefix, name, "/", NULL);
+               char *escaped = gnome_vfs_escape_string (name);
+               newprefix = g_strconcat (prefix, escaped, "/", NULL);
+               g_free (escaped);
        }
 
        Write ("<div class=\"folder\">\n");
        Write ("<h1 class=\"folderheading\">\n");
 
        Write ("<a href=\"");
-       char *escaped = gnome_vfs_escape_host_and_path_string (newprefix);
-       WriteHTMLEscape (escaped);
-       g_free (escaped);
+       WriteHTMLEscape (newprefix);
        Write ("\">");
 
        WriteHTMLEscape (name);
@@ -754,7 +754,7 @@ GMyportalProtocolHandler::RenderURL (GbS
  * inside a query string
  */
 nsresult
-GMyportalProtocolHandler::RenderSmartURL (GbSmartSite *b, const gchar *prefix)
+GMyportalProtocolHandler::RenderSmartURL (GbSmartSite *b)
 {
        Write ("<form action=\"myportal:form:");
        WriteHTMLEscape (gb_bookmark_get_id (GB_BOOKMARK (b)));


--- orig/mozilla/MyportalProtocolHandler.h
+++ mod/mozilla/MyportalProtocolHandler.h
@@ -66,7 +66,7 @@ class GMyportalProtocolHandler : public 
        nsresult RenderFolderContents (GbFolder *b, const gchar *prefix, 
                                       gint depth);
        nsresult RenderURL (GbSite *b);
-       nsresult RenderSmartURL (GbSmartSite *b, const gchar *prefix);
+       nsresult RenderSmartURL (GbSmartSite *b);
 
        nsresult Write (const char* aStr);
        nsresult WriteHTMLEscape (const char * aStr);



Reply via email to