Module:Filter

Filter = {};

-- CleanParentDirectories Main entry point for Lua test function to strip redundant ../'s from page name. Usage: function Filter.CleanParentDirectories(frame) local PageName = frame.args[1] or "" local oldPageName = '' while ( oldPageName ~= PageName ) do       oldPageName = PageName PageName = mw.ustring.gsub( PageName, '/[^/]*/\.\./', '/' )..'' end return PageName end return Filter