Remove html_enc() from RandomDate.pm (#3599)
* removed all html_enc() * fixed some tests still 2 failing * Update RandomDate.pmmaster
parent
8cbc36eb2a
commit
94b217af1a
|
@ -100,11 +100,11 @@ handle query => sub {
|
||||||
max => $max_date_formatted,
|
max => $max_date_formatted,
|
||||||
);
|
);
|
||||||
|
|
||||||
return html_enc("$formatted"),
|
return $formatted,
|
||||||
structured_answer => {
|
structured_answer => {
|
||||||
|
|
||||||
data => {
|
data => {
|
||||||
title => html_enc("$formatted"),
|
title => $formatted,
|
||||||
subtitle => $subtitle,
|
subtitle => $subtitle,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -123,7 +123,7 @@ sub build_subtitle {
|
||||||
? " between $min and $max"
|
? " between $min and $max"
|
||||||
: '';
|
: '';
|
||||||
$type eq 'format'
|
$type eq 'format'
|
||||||
? "Random date for: " . html_enc($format)
|
? "Random date for: $format"
|
||||||
: "Random $type$range_text";
|
: "Random $type$range_text";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -169,7 +169,7 @@ ddg_goodie_test(
|
||||||
is_standard => 0,
|
is_standard => 0,
|
||||||
),
|
),
|
||||||
# With HTML
|
# With HTML
|
||||||
'random date for <p>%a</p>' => build_format_test('<p>%a</p>', qr/<p>$short_name<\/p>/),
|
'random date for <p>%a</p>' => build_format_test('<p>%a</p>', qr/<p>$short_name<\/p>/),
|
||||||
# With ranges
|
# With ranges
|
||||||
'random date in the past' => build_range_test('Date', 'min', 'now'),
|
'random date in the past' => build_range_test('Date', 'min', 'now'),
|
||||||
'random past date' => build_range_test('Date', 'min', 'now'),
|
'random past date' => build_range_test('Date', 'min', 'now'),
|
||||||
|
|
Loading…
Reference in New Issue