diff --git a/lib/DDG/Goodie/ABC.pm b/lib/DDG/Goodie/ABC.pm index 535e85177..4b89d7132 100755 --- a/lib/DDG/Goodie/ABC.pm +++ b/lib/DDG/Goodie/ABC.pm @@ -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', diff --git a/lib/DDG/Goodie/Anagram.pm b/lib/DDG/Goodie/Anagram.pm index d0aba6be4..615b2f46a 100644 --- a/lib/DDG/Goodie/Anagram.pm +++ b/lib/DDG/Goodie/Anagram.pm @@ -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', diff --git a/lib/DDG/Goodie/Average.pm b/lib/DDG/Goodie/Average.pm index c53b8c85b..9c8e76b28 100644 --- a/lib/DDG/Goodie/Average.pm +++ b/lib/DDG/Goodie/Average.pm @@ -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' diff --git a/lib/DDG/Goodie/Base64.pm b/lib/DDG/Goodie/Base64.pm index e8afb51a2..f7ddf739a 100644 --- a/lib/DDG/Goodie/Base64.pm +++ b/lib/DDG/Goodie/Base64.pm @@ -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' diff --git a/lib/DDG/Goodie/Bitsum.pm b/lib/DDG/Goodie/Bitsum.pm index 899d1959d..c9d47e07a 100644 --- a/lib/DDG/Goodie/Bitsum.pm +++ b/lib/DDG/Goodie/Bitsum.pm @@ -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' diff --git a/lib/DDG/Goodie/Chars.pm b/lib/DDG/Goodie/Chars.pm index 2b225c80f..5e062c3c2 100644 --- a/lib/DDG/Goodie/Chars.pm +++ b/lib/DDG/Goodie/Chars.pm @@ -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' diff --git a/t/Average.t b/t/Average.t index ea25210ab..58b781d62 100644 --- a/t/Average.t +++ b/t/Average.t @@ -15,7 +15,7 @@ sub build_structured_answer { structured_answer => { data => { title => $result, - subtitle => $type . ' of: ' . $input + subtitle => "$type of: $input" }, templates => { group => 'text' diff --git a/t/Base64.t b/t/Base64.t index 3e580a208..dbc4ec4ea 100644 --- a/t/Base64.t +++ b/t/Base64.t @@ -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' diff --git a/t/Bitsum.t b/t/Bitsum.t index 17e61b97b..5da37d95e 100644 --- a/t/Bitsum.t +++ b/t/Bitsum.t @@ -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' diff --git a/t/Chars.t b/t/Chars.t index 10f977bd5..5236557db 100644 --- a/t/Chars.t +++ b/t/Chars.t @@ -20,7 +20,7 @@ sub build_structured_answer { structured_answer => { data => { title => $len, - subtitle => 'Character count: ' . $str + subtitle => "Character count: $str" }, templates => { group => 'text'