diff --git a/NatEditPlugin/templates/edit.natedit.tmpl b/NatEditPlugin/templates/edit.natedit.tmpl index b2e6dd5eb3..836864ffbd 100644 --- a/NatEditPlugin/templates/edit.natedit.tmpl +++ b/NatEditPlugin/templates/edit.natedit.tmpl @@ -45,7 +45,7 @@ - + %TMPL:END% %TMPL:DEF{"textarea"}%%TMPL:END% diff --git a/core/lib/Foswiki/UI/Edit.pm b/core/lib/Foswiki/UI/Edit.pm index ae4fa92763..c18afeff00 100644 --- a/core/lib/Foswiki/UI/Edit.pm +++ b/core/lib/Foswiki/UI/Edit.pm @@ -53,7 +53,9 @@ sub init_edit { # empty means edit both form and text, "form" means edit form only, # "text" means edit text only - my $editaction = lc( $query->param('action') || '' ); + my $editaction = $query->param('action') || ''; + $editaction =~ m/^(form|text)$/i; + $editaction = lc( $1 || '' ); my $adminCmd = $query->param('cmd') || ''; my $redirectTo = $query->param('redirectto') || '';