Index: openacs-4/packages/layout-manager/lib/pageset-configure-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/layout-manager/lib/pageset-configure-2.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/packages/layout-manager/lib/pageset-configure-2.tcl 3 Dec 2008 09:22:00 -0000 1.2 +++ openacs-4/packages/layout-manager/lib/pageset-configure-2.tcl 19 Jan 2010 22:52:47 -0000 1.3 @@ -12,6 +12,7 @@ page_theme:optional page_template:optional name:notnull,optional + url_name:notnull,optional op:notnull return_url:notnull {anchor ""} @@ -114,6 +115,21 @@ layout::page::set_column_value -page_id $page_id -column name -value $name } + update_url_name { + + # Fix up the url name if necessary. Transform " " to "-", remove all non-alphanumeric + # characters other than "-". Though autogenerated url names are forced to lower case, + # so by default our url names match the naming conventions we have for templates in + # openacs, no harm is done if the admin uses upper case so we'll allow it. The main + # reason to get rid of non-alphanumerics is to prevent the admin from doing something + # silly like including a query string or other semantically meaningful character + # sequences in the name. + + regsub -all -nocase { } [string trim $url_name] {-} url_name + regsub -all {[^[:alnum:]\-]} $url_name {} url_name + layout::page::set_column_value -page_id $page_id -column url_name -value $url_name + } + default { ad_return_complaint 1 "\"$op\" is not a valid operator for portal configuration" }