Remove use of `html_enc` (#3568)
* Few IAs updated * Few more IAs updated * Fixes string interpolation * Fixes more string interpolation * Fixes minor issuemaster
parent
19d361bc88
commit
1b73ba6955
|
@ -55,7 +55,7 @@ handle remainder => sub {
|
|||
|
||||
$country = $countries->{$country};
|
||||
my @currencies = @{$country->{"currencies"}};
|
||||
my $output_country = html_enc($country->{"ucwords"});
|
||||
my $output_country = $country->{"ucwords"};
|
||||
|
||||
if (scalar @currencies eq 1) {
|
||||
return $currencies[0]{"string"}, structured_answer => {
|
||||
|
|
|
@ -36,7 +36,7 @@ handle remainder => sub {
|
|||
my $message;
|
||||
if (!$result) {
|
||||
if (defined $message_part->{$email_valid->details}) {
|
||||
$message = "$address is invalid. Please check the " . $message_part->{$email_valid->details} . ".";
|
||||
$message = "$address is invalid. Please check the $message_part->{$email_valid->details}.";
|
||||
}
|
||||
$message ||= 'E-mail address $address is invalid.';
|
||||
} else {
|
||||
|
@ -45,8 +45,8 @@ handle remainder => sub {
|
|||
|
||||
return $message, structured_answer => {
|
||||
data => {
|
||||
title => html_enc($message),
|
||||
subtitle => 'Email address validation: '.html_enc($address)
|
||||
title => $message,
|
||||
subtitle => "Email address validation: $address"
|
||||
},
|
||||
templates => {
|
||||
group => 'text'
|
||||
|
|
|
@ -103,7 +103,7 @@ sub printable_chr {
|
|||
$representation->{pure} = ''; # Don't want to add any printable whitespace and wonder what happened.
|
||||
} else {
|
||||
# This must be a printable character, so just let chr figure it out
|
||||
$representation->{html} = html_enc($representation->{pure} = chr $hex);
|
||||
$representation->{html} = $representation->{pure} = chr $hex;
|
||||
}
|
||||
|
||||
return $representation;
|
||||
|
|
|
@ -20,8 +20,8 @@ handle remainder => sub {
|
|||
|
||||
return $lower, structured_answer => {
|
||||
data => {
|
||||
title => html_enc($lower),
|
||||
subtitle => "Lowercase: " . html_enc($input)
|
||||
title => $lower,
|
||||
subtitle => "Lowercase: $input"
|
||||
},
|
||||
templates => {
|
||||
group => 'text',
|
||||
|
|
|
@ -41,9 +41,7 @@ handle remainder => sub {
|
|||
my ($oui) = uc(substr($_, 0, 6));
|
||||
my ($info) = $oui_db{$oui};
|
||||
return unless $info;
|
||||
my (@vendor) = split(/\\n/, $info, 2);
|
||||
|
||||
my ($name, $addr) = map { html_enc($_); } @vendor;
|
||||
my ($name, $addr) = split(/\\n/, $info, 2);
|
||||
$addr = "No associated address" unless defined $addr;
|
||||
|
||||
# If the info is all capitals, then try to add in some best guesses for
|
||||
|
|
|
@ -43,7 +43,7 @@ handle remainder => sub {
|
|||
return $response, structured_answer => {
|
||||
data => {
|
||||
title => $response,
|
||||
subtitle => "Magic eight ball's answer to: ".html_enc($_)
|
||||
subtitle => "Magic eight ball's answer to: $_"
|
||||
},
|
||||
templates => {
|
||||
group => 'text'
|
||||
|
|
|
@ -22,8 +22,8 @@ handle remainder => sub {
|
|||
|
||||
return $result, structured_answer => {
|
||||
data => {
|
||||
title => html_enc($result),
|
||||
subtitle => 'Morse code conversion: '.html_enc($input)
|
||||
title => $result,
|
||||
subtitle => "Morse code conversion: $input"
|
||||
},
|
||||
templates => {
|
||||
group => 'text'
|
||||
|
|
|
@ -66,7 +66,7 @@ handle remainder => sub {
|
|||
structured_answer => {
|
||||
data => {
|
||||
title => $frequency." Hz",
|
||||
subtitle => "Note Frequency: " . html_enc($letter.$accidental.$octave." in A".$tuning." tuning"),
|
||||
subtitle => "Note Frequency: $letter$accidental$octave in A$tuning tuning",
|
||||
},
|
||||
templates => {
|
||||
group => 'text',
|
||||
|
|
|
@ -41,7 +41,7 @@ handle remainder => sub {
|
|||
return $result, structured_answer => {
|
||||
data => {
|
||||
title => $result,
|
||||
subtitle => "Paleo Friendly: ".html_enc($item)
|
||||
subtitle => "Paleo Friendly: $item"
|
||||
},
|
||||
templates => {
|
||||
group => 'text'
|
||||
|
|
|
@ -25,7 +25,7 @@ handle remainder => sub {
|
|||
return "Phone Number: $num", structured_answer => {
|
||||
data => {
|
||||
title => $num,
|
||||
subtitle => "Phone Number: ".html_enc($input)
|
||||
subtitle => "Phone Number: $input"
|
||||
},
|
||||
templates => {
|
||||
group => 'text'
|
||||
|
|
|
@ -39,8 +39,8 @@ handle query => sub {
|
|||
|
||||
return $result, structured_answer => {
|
||||
data => {
|
||||
title => html_enc("$result"),
|
||||
subtitle => html_enc("Translate $action Pig Latin: $to_translate"),
|
||||
title => "$result",
|
||||
subtitle => "Translate $action Pig Latin: $to_translate",
|
||||
},
|
||||
templates => {
|
||||
group => 'text',
|
||||
|
|
|
@ -45,8 +45,8 @@ handle remainder => sub {
|
|||
|
||||
return "$operation: $plaintext, with key: $key is $result", structured_answer => {
|
||||
data => {
|
||||
title => html_enc($result),
|
||||
subtitle => "$operation: " . html_enc($plaintext) . ", Key: ".html_enc($key)
|
||||
title => $result,
|
||||
subtitle => "$operation: $plaintext, Key: $key"
|
||||
},
|
||||
templates => {
|
||||
group => 'text'
|
||||
|
|
|
@ -21,8 +21,8 @@ handle remainder => sub {
|
|||
|
||||
return qq|Reversed "$_": | . $out, structured_answer => {
|
||||
data => {
|
||||
title => html_enc($out),
|
||||
subtitle => "Reverse string: ".html_enc($in)
|
||||
title => $out,
|
||||
subtitle => "Reverse string: $in"
|
||||
},
|
||||
templates => {
|
||||
group => 'text'
|
||||
|
|
Loading…
Reference in New Issue