Remove use of 'html_enc' (#3567)

* removed html_enc from ABC,ANAGRAM,AVERAGE,BASE64,BITSUM,CHARS

* string interpolation fixed

* string interpolation fix
master
Jasmeet Singh Saini 2016-09-03 20:06:12 +05:30 committed by Ben Moon
parent 1b73ba6955
commit f79cef4cf4
10 changed files with 22 additions and 22 deletions

View File

@ -38,14 +38,14 @@ handle remainder => sub {
# Multi-inputs to single input. # Multi-inputs to single input.
my $last = pop @choices; my $last = pop @choices;
my $choice_string = join(', ', @choices) . ' or ' . $last; my $choice_string = join(', ', @choices) ." or $last";
my $operation = $selection_type . ' selection from'; my $operation = "$selection_type selection from";
return $selection . " (" . $selection_type . ")", return "$selection ($selection_type)",
structured_answer => { structured_answer => {
data => { data => {
title => html_enc("$selection"), title => "$selection",
subtitle => html_enc("$operation: $choice_string") subtitle => "$operation: $choice_string"
}, },
templates => { templates => {
group => 'text', group => 'text',

View File

@ -95,8 +95,8 @@ handle remainder => sub {
return $response, return $response,
structured_answer => { structured_answer => {
data => { data => {
title => html_enc($response), title => $response,
subtitle => $operation . ' ' . html_enc($word) subtitle => "$operation $word"
}, },
templates => { templates => {
group => 'text', group => 'text',

View File

@ -72,8 +72,8 @@ handle remainder => sub {
return "$type: $result", return "$type: $result",
structured_answer => { structured_answer => {
data => { data => {
title => html_enc($result), title => $result,
subtitle => $type . ' of: ' . html_enc($_) subtitle => "$type of: $_"
}, },
templates => { templates => {
group => 'text' group => 'text'

View File

@ -19,12 +19,12 @@ handle remainder => sub {
my $output = perform_conversion($command, $input); my $output = perform_conversion($command, $input);
my $operation = 'Base64 ' . $command; my $operation = "Base64 $command";
return $operation . 'd: ' . $output, return "$operation d: $output",
structured_answer => { structured_answer => {
data => { data => {
title => html_enc($output), title => $output,
subtitle => $operation . ': ' . html_enc($input) subtitle => "$operation: $input"
}, },
templates => { templates => {
group => 'text' group => 'text'

View File

@ -44,13 +44,13 @@ handle remainder => sub {
# Count ones # Count ones
my $result = $binstring =~ tr/1/1/; my $result = $binstring =~ tr/1/1/;
$input_number .= ' (Base '.$base.', '.$base_string.')'; $input_number = "$input_number (Base $base, $base_string)";
return $result, return $result,
structured_answer => { structured_answer => {
data => { data => {
title => html_enc($result), title => $result,
subtitle => 'Hamming Weight Calculation: ' . html_enc($input_number) subtitle => "Hamming Weight Calculation: $input_number"
}, },
templates => { templates => {
group => 'text' group => 'text'

View File

@ -51,7 +51,7 @@ handle remainder => sub {
structured_answer => { structured_answer => {
data => { data => {
title => $len, title => $len,
subtitle => 'Character count: ' . html_enc($str) subtitle => "Character count: $str"
}, },
templates => { templates => {
group => 'text' group => 'text'

View File

@ -15,7 +15,7 @@ sub build_structured_answer {
structured_answer => { structured_answer => {
data => { data => {
title => $result, title => $result,
subtitle => $type . ' of: ' . $input subtitle => "$type of: $input"
}, },
templates => { templates => {
group => 'text' group => 'text'

View File

@ -11,11 +11,11 @@ zci is_cached => 1;
sub build_structured_answer { sub build_structured_answer {
my ($input, $operation, $output) = @_; my ($input, $operation, $output) = @_;
return $operation . 'd: ' . $output, return "$operation d: $output",
structured_answer => { structured_answer => {
data => { data => {
title => $output, title => $output,
subtitle => $operation . ': ' . $input subtitle => "$operation: $input"
}, },
templates => { templates => {
group => 'text' group => 'text'

View File

@ -15,7 +15,7 @@ sub build_structured_answer {
structured_answer => { structured_answer => {
data => { data => {
title => $result, title => $result,
subtitle => 'Hamming Weight Calculation: ' . $input_number subtitle => "Hamming Weight Calculation: $input_number"
}, },
templates => { templates => {
group => 'text' group => 'text'

View File

@ -20,7 +20,7 @@ sub build_structured_answer {
structured_answer => { structured_answer => {
data => { data => {
title => $len, title => $len,
subtitle => 'Character count: ' . $str subtitle => "Character count: $str"
}, },
templates => { templates => {
group => 'text' group => 'text'