--- test/html-webhacc/WebHACC/Result.pm 2008/08/15 16:03:46 1.13
+++ test/html-webhacc/WebHACC/Result.pm 2008/08/30 10:27:47 1.17
@@ -170,7 +170,37 @@
if (defined $opt{value}) {
$out->html (' ');
- $out->code ($opt{value});
+ if (defined $opt{pos_start}) {
+ $out->start_tag ('code');
+ $out->text (substr $opt{value}, 0, $opt{pos_start});
+ $out->start_tag ('mark');
+ $out->text (substr $opt{value}, $opt{pos_start},
+ $opt{pos_end} - $opt{pos_start} + 1);
+ $out->end_tag ('mark');
+ $out->text (substr $opt{value}, $opt{pos_end} + 1)
+ if $opt{pos_end} < length $opt{value};
+ $out->end_tag ('code');
+ } elsif ($opt{value_mark_end}) {
+ $out->start_tag ('code');
+ $out->text ($opt{value});
+ $out->start_tag ('mark');
+ $out->end_tag ('mark');
+ $out->end_tag ('code');
+ } elsif (defined $opt{value_mark}) {
+ $out->start_tag ('code');
+ for (split /($opt{value_mark})/, $opt{value}) {
+ if (/$opt{value_mark}/) {
+ $out->start_tag ('mark');
+ $out->text ($_);
+ $out->end_tag ('mark');
+ } else {
+ $out->text ($_);
+ }
+ }
+ $out->end_tag ('code');
+ } else {
+ $out->code ($opt{value});
+ }
$has_location = 1;
}
@@ -185,8 +215,8 @@
} elsif (defined $opt{input}->{request_uri}) {
$out->url ($opt{input}->{request_uri});
$has_location = 1;
- } elsif (defined $opt{input}->{uri}) {
- $out->url ($opt{input}->{uri});
+ } elsif (defined $opt{input}->url) {
+ $out->url ($opt{input}->url);
$has_location = 1;
}
}
@@ -206,13 +236,6 @@
my $error_type_text = $opt{type};
$out->nl_text ($error_type_text, node => $opt{node}, text => $opt{text},
value => $opt{value});
-
- ## Additional error description
- if (defined $opt{text}) { ## TODO: Remove this block once all errors are put into the catalog.
- $out->html (' (');
- $out->text ($opt{text});
- $out->html ('
)');
- }
## Link to a long description
@@ -220,8 +243,10 @@
$fragment =~ tr/ /-/;
$fragment = $out->encode_url_component ($fragment);
$out->text (' [');
- $out->link ('Description', url => '../error-description#' . $fragment,
- rel => 'help');
+ $out->start_tag ('a', href => '../error-description#' . $fragment,
+ rel => 'help');
+ $out->nl_text ('Description');
+ $out->end_tag ('a');
$out->text (']');
if ($error_level eq 'm') {