Forum OpenACS Q&A: Re: /www in URLs returned from Search

Collapse
Posted by Matthew Geddert on
its a bug - i fixed it but it dave must not have included it in the release... the fix is on this page: /packages/static-pages/static-pages-sc-procs.tcl

Edit the static_page__url proc to this... and restart-aolserver.

ad_proc static_page__url {
    object_id
} {
    @author Dave Bauer (dave@thedesignexperience.org)
} {

    db_1row sp_url ""
    set url "${url}"
    set url "StArT$url"
    regsub -all "StArT/www" $url " " url
    regsub -all ".html" $url " " url
    regsub -all ".htm" $url " " url
    set url "$url "
    regsub -all "/index " $url "/" url
    set url [string trim $url]
    return $url
}
Note, if you want the .html or .htm to show up on the searches remove the two lines dealing with those from this proc
Collapse
Posted by Rich Graves on
Shouldn't you be using string map instead of regsub? Or does that no longer apply? I have a dim memory of performance problems and memory leaks in regsub.