Index: openacs-4/packages/xowiki/tcl/xowiki-portlet-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/Attic/xowiki-portlet-procs.tcl,v diff -u -r1.83.2.5 -r1.83.2.6 --- openacs-4/packages/xowiki/tcl/xowiki-portlet-procs.tcl 13 Sep 2007 08:33:43 -0000 1.83.2.5 +++ openacs-4/packages/xowiki/tcl/xowiki-portlet-procs.tcl 13 Sep 2007 10:46:37 -0000 1.83.2.6 @@ -65,6 +65,16 @@ ::xowiki::Portlet proc html_id {name} { # Construct a valid HTML id or name. # For details, see http://www.w3.org/TR/html4/types.html + # + # For XOTcl object names, strip first the colons + set name [string trimleft $name :] + + # make sure, the ID starts with characters + if {![regexp {^[A-Za-z]} $name]} { + set name id_$name + } + + # replace unwanted characters regsub -all {[^A-Za-z0-9_:.-]} $name _ name return $name } @@ -1153,6 +1163,7 @@ {-remove_levels 0} {-category_id} }} + id } #"select page_id, page_order, name, title, \ @@ -1249,7 +1260,7 @@ } toc instproc ajax_tree {js_tree_cmds} { - return "
+ return "