[Bps-public-commit] rt-extension-assigntomenu branch, master, updated. 2f252f6b9383c816d8af96b09a0f7006ab6d1e2d

? sunnavy sunnavy at bestpractical.com
Thu Aug 2 11:23:03 EDT 2012


The branch, master has been updated
       via  2f252f6b9383c816d8af96b09a0f7006ab6d1e2d (commit)
      from  9f4f8a5c02620524c666690263169c91f8757bb5 (commit)

Summary of changes:
 html/Callbacks/AssignToMenu/Elements/Tabs/Privileged | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

- Log -----------------------------------------------------------------
commit 2f252f6b9383c816d8af96b09a0f7006ab6d1e2d
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Thu Aug 2 23:21:22 2012 +0800

    to canonicalize //+ in url to single /
    
    old code only takes care of the first //+ and is also wrong

diff --git a/html/Callbacks/AssignToMenu/Elements/Tabs/Privileged b/html/Callbacks/AssignToMenu/Elements/Tabs/Privileged
index 6d512f7..8b0e45e 100644
--- a/html/Callbacks/AssignToMenu/Elements/Tabs/Privileged
+++ b/html/Callbacks/AssignToMenu/Elements/Tabs/Privileged
@@ -47,7 +47,7 @@
 %# END BPS TAGGED BLOCK }}}
 <%INIT>
 my $request_path = $HTML::Mason::Commands::r->path_info;
-$request_path =~ s!^/{2,}!!;
+$request_path =~ s!/{2,}!/!g;
 
 if ( $request_path =~ qr{^/Ticket/} ) {
     if ( ( $m->request_args->{'id'} || '' ) =~ /^(\d+)$/ ) {

-----------------------------------------------------------------------



More information about the Bps-public-commit mailing list