| 1191 | | } |
| 1192 | | else { |
| | 1199 | } elsif ($args{format} && $args{format} eq 'opensearch') { |
| | 1200 | my $site_name = $self->config->site_name; |
| | 1201 | my $search_url = $self->config->script_url . 'search.cgi'; |
| | 1202 | my $contact_email = $self->config->contact_email; |
| | 1203 | $output = qq{Content-Type: application/opensearchdescription+xml; charset=utf-8 |
| | 1204 | |
| | 1205 | <?xml version="1.0" encoding="UTF-8"?> |
| | 1206 | |
| | 1207 | <OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/"> |
| | 1208 | <ShortName>$site_name</ShortName> |
| | 1209 | <Description>Search the $site_name</Description> |
| | 1210 | <Tags>$site_name</Tags> |
| | 1211 | <Contact>$contact_email</Contact> |
| | 1212 | <Url type="application/atom+xml" |
| | 1213 | template="$search_url?search={searchTerms};format=atom"/> |
| | 1214 | <Url type="application/rss+xml" |
| | 1215 | template="$search_url?search={searchTerms};format=rss"/> |
| | 1216 | <Url type="text/html" |
| | 1217 | template="$search_url?search={searchTerms}"/> |
| | 1218 | <Query role="example" searchTerms="pubs"/> |
| | 1219 | </OpenSearchDescription>}; |
| | 1220 | } else { |