170 |
|
|
171 |
if (defined $opt{value}) { |
if (defined $opt{value}) { |
172 |
$out->html (' '); |
$out->html (' '); |
173 |
$out->code ($opt{value}); |
if (defined $opt{pos_start}) { |
174 |
|
$out->start_tag ('code'); |
175 |
|
$out->text (substr $opt{value}, 0, $opt{pos_start}); |
176 |
|
$out->start_tag ('mark'); |
177 |
|
$out->text (substr $opt{value}, $opt{pos_start}, |
178 |
|
$opt{pos_end} - $opt{pos_start} + 1); |
179 |
|
$out->end_tag ('mark'); |
180 |
|
$out->text (substr $opt{value}, $opt{pos_end} + 1) |
181 |
|
if $opt{pos_end} < length $opt{value}; |
182 |
|
$out->end_tag ('code'); |
183 |
|
} elsif ($opt{value_mark_end}) { |
184 |
|
$out->start_tag ('code'); |
185 |
|
$out->text ($opt{value}); |
186 |
|
$out->start_tag ('mark'); |
187 |
|
$out->end_tag ('mark'); |
188 |
|
$out->end_tag ('code'); |
189 |
|
} elsif (defined $opt{value_mark}) { |
190 |
|
$out->start_tag ('code'); |
191 |
|
for (split /($opt{value_mark})/, $opt{value}) { |
192 |
|
if (/$opt{value_mark}/) { |
193 |
|
$out->start_tag ('mark'); |
194 |
|
$out->text ($_); |
195 |
|
$out->end_tag ('mark'); |
196 |
|
} else { |
197 |
|
$out->text ($_); |
198 |
|
} |
199 |
|
} |
200 |
|
$out->end_tag ('code'); |
201 |
|
} else { |
202 |
|
$out->code ($opt{value}); |
203 |
|
} |
204 |
$has_location = 1; |
$has_location = 1; |
205 |
} |
} |
206 |
|
|
215 |
} elsif (defined $opt{input}->{request_uri}) { |
} elsif (defined $opt{input}->{request_uri}) { |
216 |
$out->url ($opt{input}->{request_uri}); |
$out->url ($opt{input}->{request_uri}); |
217 |
$has_location = 1; |
$has_location = 1; |
218 |
} elsif (defined $opt{input}->{uri}) { |
} elsif (defined $opt{input}->url) { |
219 |
$out->url ($opt{input}->{uri}); |
$out->url ($opt{input}->url); |
220 |
$has_location = 1; |
$has_location = 1; |
221 |
} |
} |
222 |
} |
} |
234 |
|
|
235 |
## Error message |
## Error message |
236 |
my $error_type_text = $opt{type}; |
my $error_type_text = $opt{type}; |
237 |
$out->nl_text ($error_type_text, node => $opt{node}, text => $opt{text}); |
$out->nl_text ($error_type_text, node => $opt{node}, text => $opt{text}, |
238 |
|
value => $opt{value}, char => $opt{char}, |
239 |
## Additional error description |
octets => $opt{octets}); |
|
if (defined $opt{text}) { |
|
|
$out->html (' (<q>'); |
|
|
$out->text ($opt{text}); |
|
|
$out->html ('</q>)'); |
|
|
} |
|
240 |
|
|
241 |
## Link to a long description |
## Link to a long description |
242 |
|
|
244 |
$fragment =~ tr/ /-/; |
$fragment =~ tr/ /-/; |
245 |
$fragment = $out->encode_url_component ($fragment); |
$fragment = $out->encode_url_component ($fragment); |
246 |
$out->text (' ['); |
$out->text (' ['); |
247 |
$out->link ('Description', url => '../error-description#' . $fragment, |
$out->start_tag ('a', href => '../error-description#' . $fragment, |
248 |
rel => 'help'); |
rel => 'help'); |
249 |
|
$out->nl_text ('Description'); |
250 |
|
$out->end_tag ('a'); |
251 |
$out->text (']'); |
$out->text (']'); |
252 |
|
|
253 |
if ($error_level eq 'm') { |
if ($error_level eq 'm') { |