[vhffs-dev] [1555] Using rewritten URLs is nice except when you' ve some + sign in your address and that it isn't escaped by browser ( which happens in AJAX I guess).

[ Thread Index | Date Index | More vhffs.org/vhffs-dev Archives ]


Revision: 1555
Author:   beuss
Date:     2010-03-12 23:42:28 +0100 (Fri, 12 Mar 2010)
Log Message:
-----------
Using rewritten URLs is nice except when you've some + sign in your address and that it isn't escaped by browser (which happens in AJAX I guess). Anyway, here is a workaround. It is not perfect but at least it works...

Modified Paths:
--------------
    trunk/vhffs-public/tagsearch.pl

Modified: trunk/vhffs-public/tagsearch.pl
===================================================================
--- trunk/vhffs-public/tagsearch.pl	2010-03-12 22:25:14 UTC (rev 1554)
+++ trunk/vhffs-public/tagsearch.pl	2010-03-12 22:42:28 UTC (rev 1555)
@@ -37,6 +37,7 @@
 use POSIX qw(locale_h);
 use locale;
 use Locale::gettext;
+use URI::Escape qw(uri_escape);
 
 use lib '%VHFFS_LIB_DIR%';
 
@@ -69,8 +70,11 @@
 	exit(0);
 }
 
-my $pager = Vhffs::Panel::Commons::get_pager($page, $count, 10, 5, $panel->{url}, { search => $search});
+my $url = $panel->{url};
+$url =~ s!tags/.*!tagsearch.pl!;
 
+my $pager = Vhffs::Panel::Commons::get_pager($page, $count, 10, 5, $url, { search => uri_escape($search)});
+
 my $vars = {
 	groups => $groups,
 	gs_title => gettext( 'Search results' ),


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/