Remove use of 'html_enc' (#3567)
* removed html_enc from ABC,ANAGRAM,AVERAGE,BASE64,BITSUM,CHARS * string interpolation fixed * string interpolation fixmaster
parent
1b73ba6955
commit
f79cef4cf4
|
@ -38,14 +38,14 @@ handle remainder => sub {
|
|||
|
||||
# Multi-inputs to single input.
|
||||
my $last = pop @choices;
|
||||
my $choice_string = join(', ', @choices) . ' or ' . $last;
|
||||
my $operation = $selection_type . ' selection from';
|
||||
my $choice_string = join(', ', @choices) ." or $last";
|
||||
my $operation = "$selection_type selection from";
|
||||
|
||||
return $selection . " (" . $selection_type . ")",
|
||||
return "$selection ($selection_type)",
|
||||
structured_answer => {
|
||||
data => {
|
||||
title => html_enc("$selection"),
|
||||
subtitle => html_enc("$operation: $choice_string")
|
||||
title => "$selection",
|
||||
subtitle => "$operation: $choice_string"
|
||||
},
|
||||
templates => {
|
||||
group => 'text',
|
||||
|
|
|
@ -95,8 +95,8 @@ handle remainder => sub {
|
|||
return $response,
|
||||
structured_answer => {
|
||||
data => {
|
||||
title => html_enc($response),
|
||||
subtitle => $operation . ' ' . html_enc($word)
|
||||
title => $response,
|
||||
subtitle => "$operation $word"
|
||||
},
|
||||
templates => {
|
||||
group => 'text',
|
||||
|
|
|
@ -72,8 +72,8 @@ handle remainder => sub {
|
|||
return "$type: $result",
|
||||
structured_answer => {
|
||||
data => {
|
||||
title => html_enc($result),
|
||||
subtitle => $type . ' of: ' . html_enc($_)
|
||||
title => $result,
|
||||
subtitle => "$type of: $_"
|
||||
},
|
||||
templates => {
|
||||
group => 'text'
|
||||
|
|
|
@ -19,12 +19,12 @@ handle remainder => sub {
|
|||
|
||||
my $output = perform_conversion($command, $input);
|
||||
|
||||
my $operation = 'Base64 ' . $command;
|
||||
return $operation . 'd: ' . $output,
|
||||
my $operation = "Base64 $command";
|
||||
return "$operation d: $output",
|
||||
structured_answer => {
|
||||
data => {
|
||||
title => html_enc($output),
|
||||
subtitle => $operation . ': ' . html_enc($input)
|
||||
title => $output,
|
||||
subtitle => "$operation: $input"
|
||||
},
|
||||
templates => {
|
||||
group => 'text'
|
||||
|
|
|
@ -44,13 +44,13 @@ handle remainder => sub {
|
|||
|
||||
# Count ones
|
||||
my $result = $binstring =~ tr/1/1/;
|
||||
$input_number .= ' (Base '.$base.', '.$base_string.')';
|
||||
$input_number = "$input_number (Base $base, $base_string)";
|
||||
|
||||
return $result,
|
||||
structured_answer => {
|
||||
data => {
|
||||
title => html_enc($result),
|
||||
subtitle => 'Hamming Weight Calculation: ' . html_enc($input_number)
|
||||
title => $result,
|
||||
subtitle => "Hamming Weight Calculation: $input_number"
|
||||
},
|
||||
templates => {
|
||||
group => 'text'
|
||||
|
|
|
@ -51,7 +51,7 @@ handle remainder => sub {
|
|||
structured_answer => {
|
||||
data => {
|
||||
title => $len,
|
||||
subtitle => 'Character count: ' . html_enc($str)
|
||||
subtitle => "Character count: $str"
|
||||
},
|
||||
templates => {
|
||||
group => 'text'
|
||||
|
|
|
@ -15,7 +15,7 @@ sub build_structured_answer {
|
|||
structured_answer => {
|
||||
data => {
|
||||
title => $result,
|
||||
subtitle => $type . ' of: ' . $input
|
||||
subtitle => "$type of: $input"
|
||||
},
|
||||
templates => {
|
||||
group => 'text'
|
||||
|
|
|
@ -11,11 +11,11 @@ zci is_cached => 1;
|
|||
|
||||
sub build_structured_answer {
|
||||
my ($input, $operation, $output) = @_;
|
||||
return $operation . 'd: ' . $output,
|
||||
return "$operation d: $output",
|
||||
structured_answer => {
|
||||
data => {
|
||||
title => $output,
|
||||
subtitle => $operation . ': ' . $input
|
||||
subtitle => "$operation: $input"
|
||||
},
|
||||
templates => {
|
||||
group => 'text'
|
||||
|
|
|
@ -15,7 +15,7 @@ sub build_structured_answer {
|
|||
structured_answer => {
|
||||
data => {
|
||||
title => $result,
|
||||
subtitle => 'Hamming Weight Calculation: ' . $input_number
|
||||
subtitle => "Hamming Weight Calculation: $input_number"
|
||||
},
|
||||
templates => {
|
||||
group => 'text'
|
||||
|
|
Loading…
Reference in New Issue