kareila: (Default)
kareila ([personal profile] kareila) wrote in [site community profile] changelog2010-03-31 02:51 am

[dw-free] Styles: redirect /tags to /tag

[commit: http://hg.dwscoalition.org/dw-free/rev/8d1a1d18e743]

http://bugs.dwscoalition.org/show_bug.cgi?id=2335

Of course I realized about 2 seconds after I committed [personal profile] yvi's
patch that the regexp wasn't anchored.

Patch by [personal profile] kareila.

Files modified:
  • cgi-bin/Apache/LiveJournal.pm
--------------------------------------------------------------------------------
diff -r 56ee98363f00 -r 8d1a1d18e743 cgi-bin/Apache/LiveJournal.pm
--- a/cgi-bin/Apache/LiveJournal.pm	Tue Mar 30 21:43:34 2010 -0500
+++ b/cgi-bin/Apache/LiveJournal.pm	Tue Mar 30 21:51:29 2010 -0500
@@ -660,7 +660,7 @@ sub trans
         $ret = DW::Routing->call( username => $user ) unless defined $ret;
         return $ret if defined $ret;
 
-        if ($uuri =~ m#tags(.*)#) {
+        if ($uuri =~ m#^/tags(.*)#) {
             return redir($r, "/tag$1");
         }
 
--------------------------------------------------------------------------------