[Sputnik-list] Directory pages

Yuri Takhteyev yuri at sims.berkeley.edu
Fri Feb 1 00:56:50 GMT+2 2008


>  I'd like to edit pages with slashes in their name (for example
>  http://mydomain.net/foo/bar). But whenever I try to edit such a page,
>  the slashes are replaced by underscores. How can I configure Sputnik
>  to achieve that ?

That would be closer to "hacking" than configuring, but you can edit
the value of "pattern" in dirify() in sputnik/util.lua

    function dirify(text)
       local pattern = [[[%?%+%=%%%s%'%"%/%\]+]]
       text = text or ""
       return text:gsub(pattern, "_")
    end

If there is much interest, I can make this configurable through a
config variable, something like

    ILLEGAL_URL_CHARACTERS = [[?+=%'"/\]]

(plus hardcode %s).  Or I could remove "/" from that list.

The reason I included "/" there is because I am thinking of one day
adding "groups" which will give "/" a specific meaning

- yuri

-- 
http://sputnik.freewisdom.org/



More information about the Sputnik-list mailing list