my $cgi = Bugzilla->cgi;
-my $id = $cgi->param('id');
-if ($id) {
+if ($::FORM{'id'}) {
# Remove all dodgy chars, and split into name and ctype.
- $id =~ s/[^\w\-\.]//g;
- $id =~ /(.*)\.(.*)/;
- if (!$2) {
- # if this regexp fails to match completely, something bad came in
- ThrowCodeError("bad_page_cgi_id", { "page_id" => $id });
- }
+ $::FORM{'id'} =~ s/[^\w\-\.]//g;
+ $::FORM{'id'} =~ /(.*)\.(.*)/;
my $format = GetFormat("pages/$1", undef, $2);
- $cgi->param('id', $id);
+ $vars->{'form'} = \%::FORM;
print $cgi->header($format->{'ctype'});
[% ELSIF error == "authres_unhandled" %]
An authorization handler return value was not handled by the login code.
- [% ELSIF error == "bad_page_cgi_id" %]
- [% title = "Invalid Page ID" %]
- The ID <code>[% page_id FILTER html %]</code> is not a
- valid page identifier.
-
[% ELSIF error == "bug_error" %]
Trying to retrieve [% terms.bug %] [%+ bug.bug_id FILTER html %] returned
the error [% bug.error FILTER html %].
#%]
[% INCLUDE global/header.html.tmpl title = "Your Linkified Text" %]
-[% USE Bugzilla %]
-[% cgi = Bugzilla.cgi %]
<p>
Copy and paste the text below:
<p>
<pre>
-[%- cgi.param("text") FILTER quoteUrls FILTER html -%]
+[%- form.text FILTER quoteUrls FILTER html -%]
</pre>
</p>
<p>
<pre>
-[%- cgi.param("text") FILTER quoteUrls -%]
+[%- form.text FILTER quoteUrls -%]
</pre>
</p>