[interchange-cvs] interchange - heins modified dist/lib/UI/pages/admin/content_editor.html
interchange-core@icdevgroup.org
interchange-core@icdevgroup.org
Wed Jan 22 09:00:01 2003
User: heins
Date: 2003-01-22 13:59:45 GMT
Modified: dist/lib/UI/pages/admin content_editor.html
Log:
* Prevent bad component and template names.
Revision Changes Path
1.4 +13 -2 interchange/dist/lib/UI/pages/admin/content_editor.html
rev 1.4, prev_rev 1.3
Index: content_editor.html
===================================================================
RCS file: /var/cvs/interchange/dist/lib/UI/pages/admin/content_editor.html,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- content_editor.html 13 Sep 2002 20:46:20 -0000 1.3
+++ content_editor.html 22 Jan 2003 13:59:45 -0000 1.4
@@ -41,10 +41,15 @@
[calc]
$CGI->{ui_name} =~ s/^\s+//;
$CGI->{ui_name} =~ s/\s+$//;
- $CGI->{ui_name} = $Tag->filter({
+ if($CGI->{ui_type} eq 'page') {
+ $CGI->{ui_name} = $Tag->filter({
op => 'filesafe',
body => $CGI->{ui_name},
});
+ }
+ else {
+ $CGI->{ui_name} =~ s/\W+/_/g;
+ }
return unless $CGI->{ui_type} eq 'page';
my $pat = quotemeta $Config->{HTMLsuffix};
#Debug("pat=$pat");
@@ -62,6 +67,12 @@
<input type=hidden name="ui_type" value="[cgi ui_type]">
<input type=hidden name="ui_return_to" value="[cgi ui_return_to]">
</td>
+ <td>
+
+ [if cgi ui_type ne page]
+ <span class=chelp>Names may not contain non-word characters</span>
+ [/if]
+ </td>
</tr>
[if cgi ui_type eq page]
<tr>
@@ -79,7 +90,7 @@
[/if]
<tr>
<td> </td>
- <td>
+ <td colspan=2>
<input type=submit value="[msg arg.0=`$CGI->{ui_type}`]Create new %s[/msg]">
</td>
</tr>