diff --git a/lib/DDG/Goodie/Atbash.pm b/lib/DDG/Goodie/Atbash.pm
index 4c75770c4..28baae835 100755
--- a/lib/DDG/Goodie/Atbash.pm
+++ b/lib/DDG/Goodie/Atbash.pm
@@ -31,7 +31,7 @@ handle remainder => sub {
structured_answer => {
data => {
title => "$result",
- subtitle => html_enc("Atbash: $in_string")
+ subtitle => "Atbash: $in_string"
},
templates => {
group => 'text',
diff --git a/lib/DDG/Goodie/Braille.pm b/lib/DDG/Goodie/Braille.pm
index 3930dd16a..00f2c545f 100644
--- a/lib/DDG/Goodie/Braille.pm
+++ b/lib/DDG/Goodie/Braille.pm
@@ -34,7 +34,7 @@ handle query_raw => sub {
structured_answer => {
data => {
title => $response,
- subtitle => 'Braille translation: ' . html_enc($query),
+ subtitle => "Braille translation: $query",
},
templates => {
group => 'text',
diff --git a/lib/DDG/Goodie/CaesarCipher.pm b/lib/DDG/Goodie/CaesarCipher.pm
index ef7abdbb4..3cd32aee2 100755
--- a/lib/DDG/Goodie/CaesarCipher.pm
+++ b/lib/DDG/Goodie/CaesarCipher.pm
@@ -93,7 +93,7 @@ handle remainder => sub {
structured_answer => {
data => {
title => "$result",
- subtitle => html_enc("Caesar cipher $shift_val $to_cipher"),
+ subtitle => "Caesar cipher $shift_val $to_cipher",
},
templates => {
group => 'text',
diff --git a/lib/DDG/Goodie/FIGlet.pm b/lib/DDG/Goodie/FIGlet.pm
index 0670f56dd..db86c4afc 100644
--- a/lib/DDG/Goodie/FIGlet.pm
+++ b/lib/DDG/Goodie/FIGlet.pm
@@ -53,10 +53,6 @@ handle query => sub {
return unless $figlet;
- if ($font eq 'rot13' || $font eq 'mnemonic' || $font eq 'term') {
- $figlet = html_enc($figlet);
- }
-
return $figlet,
structured_answer => {
data => {
diff --git a/lib/DDG/Goodie/IDN.pm b/lib/DDG/Goodie/IDN.pm
index deeb63d37..b6418e3fd 100644
--- a/lib/DDG/Goodie/IDN.pm
+++ b/lib/DDG/Goodie/IDN.pm
@@ -19,10 +19,10 @@ handle query_lc => sub {
$idn = 'internationalized domain: ' if $1 eq 'internationalize domain';
return unless m/\.(ac|ad|ae|aero|af|ag|ai|al|am|an|ao|aq|ar|arpa|as|asia|at|au|aw|ax|az|ba|bb|bd|be|bf|bg|bh|bi|biz|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|ca|cat|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|co|com|coop|cr|cu|cv|cw|cx|cy|cz|de|dj|dk|dm|do|dz|ec|edu|ee|eg|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gg|gh|gi|gl|gm|gn|gov|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|im|in|info|int|io|iq|ir|is|it|je|jm|jo|jobs|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|local|lr|ls|lt|lu|lv|ly|ma|mc|md|me|mg|mh|mil|mk|ml|mm|mn|mo|mobi|mp|mq|mr|ms|mt|mu|museum|mv|mw|mx|my|mz|na|name|nc|ne|net|nf|ng|ni|nl|no|np|nr|nu|nz|om|org|pa|pe|pf|pg|ph|pk|pl|pm|pn|pr|pro|ps|pt|pw|py|qa|re|ro|rs|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|sk|sl|sm|sn|so|sr|st|su|sv|sx|sy|sz|tc|td|tel|tf|tg|th|tj|tk|tl|tm|tn|to|tp|tr|travel|tt|tv|tw|tz|ua|ug|uk|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|xxx|ye|yt|za|zm|zw)$/i;
if(/^xn--/) {
- return 'Decoded ' . $idn . html_enc(domain_to_unicode($_));
+ return 'Decoded ' . $idn . domain_to_unicode($_);
}
else {
- return 'Encoded ' . $idn . html_enc(domain_to_ascii($_));
+ return 'Encoded ' . $idn . domain_to_ascii($_);
}
return;
};
diff --git a/lib/DDG/Goodie/MD4.pm b/lib/DDG/Goodie/MD4.pm
index 30f8c1ab7..14a2f8081 100644
--- a/lib/DDG/Goodie/MD4.pm
+++ b/lib/DDG/Goodie/MD4.pm
@@ -35,8 +35,8 @@ handle remainder => sub {
return $out, structured_answer => {
data => {
- title => html_enc($out),
- subtitle => html_enc('MD4 ' . $enc . ' hash').": " .html_enc($str)
+ title => $out,
+ subtitle => "MD4 $enc hash: $str"
},
templates => {
group => 'text'
diff --git a/lib/DDG/Goodie/MD5.pm b/lib/DDG/Goodie/MD5.pm
index 55c0e7cd7..e3c2ffabf 100644
--- a/lib/DDG/Goodie/MD5.pm
+++ b/lib/DDG/Goodie/MD5.pm
@@ -34,7 +34,7 @@ handle remainder => sub {
return $md5, structured_answer => {
data => {
title => $md5,
- subtitle => "MD5 $format hash: ". html_enc($str)
+ subtitle => "MD5 $format hash: $str"
},
templates => {
group => 'text'
diff --git a/lib/DDG/Goodie/NameDays.pm b/lib/DDG/Goodie/NameDays.pm
index 3ce828358..ae4a51005 100644
--- a/lib/DDG/Goodie/NameDays.pm
+++ b/lib/DDG/Goodie/NameDays.pm
@@ -91,7 +91,7 @@ handle remainder => sub {
# Search by name first
$query = ucfirst($_);
($text, $html) = split('\|', $dates{lc($_)});
- $header = 'Name days for ' . html_enc($query) . '';
+ $header = "Name days for $query";
} else {
# Then, search by date
my $day = parse_datestring_to_date($_);
@@ -120,12 +120,12 @@ handle remainder => sub {
' ' . $1 . '' .
'
' . $2 . ' | '@ge;
- $header = 'Name days on ' . html_enc($query) . '';
+ $header = "Name days on $query";
}
# Add the header
$html = '' .
- '
' . $header . '' .
+ "
$header" .
'
';
diff --git a/lib/DDG/Goodie/RIPEMD.pm b/lib/DDG/Goodie/RIPEMD.pm
index 7a0515ef8..7453fa3e8 100755
--- a/lib/DDG/Goodie/RIPEMD.pm
+++ b/lib/DDG/Goodie/RIPEMD.pm
@@ -49,8 +49,8 @@ handle query => sub {
my $operation = 'RIPEMD-' . $ver . ' ' . $enc . ' hash';
return $out, structured_answer => {
data => {
- title => html_enc($out),
- subtitle => "$operation: " . html_enc($str)
+ title => $out,
+ subtitle => "$operation: $str"
},
templates => {
group => 'text'
diff --git a/lib/DDG/Goodie/Regexp.pm b/lib/DDG/Goodie/Regexp.pm
index 693604142..a309fe5be 100644
--- a/lib/DDG/Goodie/Regexp.pm
+++ b/lib/DDG/Goodie/Regexp.pm
@@ -79,7 +79,7 @@ handle query => sub {
structured_answer => {
data => {
title => "Regular Expression Match",
- subtitle => html_enc("Match regular expression /$regexp/$modifiers on $str"),
+ subtitle => "Match regular expression /$regexp/$modifiers on $str",
record_data => $matches,
record_keys => \@key_order,
},
diff --git a/lib/DDG/Goodie/Rot13.pm b/lib/DDG/Goodie/Rot13.pm
index d2d1e7660..2df61f5c2 100755
--- a/lib/DDG/Goodie/Rot13.pm
+++ b/lib/DDG/Goodie/Rot13.pm
@@ -19,8 +19,8 @@ handle remainder => sub {
return "ROT13: $out", structured_answer => {
data => {
- title => html_enc($out),
- subtitle => "ROT13: ".html_enc($in)
+ title => $out,
+ subtitle => "ROT13: $in"
},
templates => {
group => 'text'
diff --git a/lib/DDG/Goodie/Scramble.pm b/lib/DDG/Goodie/Scramble.pm
index 84a610a15..3c72f4be5 100644
--- a/lib/DDG/Goodie/Scramble.pm
+++ b/lib/DDG/Goodie/Scramble.pm
@@ -48,8 +48,8 @@ handle remainder_lc => sub {
return "$operation $word", structured_answer => {
data => {
- title => html_enc($response),
- subtitle => html_enc("$operation: $word")
+ title => $response,
+ subtitle => "$operation: $word"
},
templates => {
group => 'text'
diff --git a/lib/DDG/Goodie/TimezoneConverter.pm b/lib/DDG/Goodie/TimezoneConverter.pm
index 3adb49d6c..d4b233f35 100755
--- a/lib/DDG/Goodie/TimezoneConverter.pm
+++ b/lib/DDG/Goodie/TimezoneConverter.pm
@@ -174,8 +174,8 @@ handle query => sub {
return $output_string, structured_answer => {
data => {
- title => html_enc($output_string),
- subtitle => "Convert Timezone: ".html_enc($input_string)
+ title => $output_string,
+ subtitle => "Convert Timezone: $input_string"
},
templates => {
group => 'text'
diff --git a/lib/DDG/Goodie/TitleCase.pm b/lib/DDG/Goodie/TitleCase.pm
index b2986a510..5e4d62c5c 100755
--- a/lib/DDG/Goodie/TitleCase.pm
+++ b/lib/DDG/Goodie/TitleCase.pm
@@ -31,8 +31,8 @@ handle remainder => sub {
return $title_case, structured_answer => {
data => {
- title => html_enc($title_case),
- subtitle => 'Title case: '.html_enc($input)
+ title => $title_case,
+ subtitle => "Title case: $input"
},
templates => {
group => 'text'
diff --git a/t/Atbash.t b/t/Atbash.t
index b84b9a7ac..568ca71c4 100755
--- a/t/Atbash.t
+++ b/t/Atbash.t
@@ -44,7 +44,7 @@ ddg_goodie_test(
structured_answer => {
data => {
title => "Tlmmz kzigb orpv rg'h 1999!",
- subtitle => "Atbash: Gonna party like it's 1999!"
+ subtitle => "Atbash: Gonna party like it's 1999!"
},
templates => {
group => 'text',
diff --git a/t/Braille.t b/t/Braille.t
index 7c2d7163a..df5fb8ca0 100644
--- a/t/Braille.t
+++ b/t/Braille.t
@@ -35,9 +35,9 @@ ddg_goodie_test(
'translate to braille to braille' => build_test('translate to braille', '⠞⠗⠁⠝⠎⠇⠁⠞⠑⠀⠞⠕⠀⠃⠗⠁⠊⠇⠇⠑'),
'braille: asdf k' => build_test('asdf k', '⠁⠎⠙⠋⠀⠅'),
# Braille -> Ascii/Unicode
- '⠓⠑⠀⠇⠇⠕' => build_test('⠓⠑⠀⠇⠇⠕', 'he llo'),
- '⠞⠗⠁⠝⠎⠇⠁⠞⠑⠀⠞⠕⠀⠃⠗⠁⠊⠇⠇⠑' => build_test('⠞⠗⠁⠝⠎⠇⠁⠞⠑⠀⠞⠕⠀⠃⠗⠁⠊⠇⠇⠑', 'translate to braille'),
- '⠁⠎⠙⠋⠀⠅' => build_test('⠁⠎⠙⠋⠀⠅', 'asdf k'),
+ '⠓⠑⠀⠇⠇⠕' => build_test('⠓⠑⠀⠇⠇⠕', 'he llo'),
+ '⠞⠗⠁⠝⠎⠇⠁⠞⠑⠀⠞⠕⠀⠃⠗⠁⠊⠇⠇⠑' => build_test('⠞⠗⠁⠝⠎⠇⠁⠞⠑⠀⠞⠕⠀⠃⠗⠁⠊⠇⠇⠑', 'translate to braille'),
+ '⠁⠎⠙⠋⠀⠅' => build_test('⠁⠎⠙⠋⠀⠅', 'asdf k'),
# Invalid Queries
'braille asdf k' => undef,
'how long to learn braille' => undef,
diff --git a/t/CaesarCipher.t b/t/CaesarCipher.t
index 129e0b2e8..34c3de91a 100644
--- a/t/CaesarCipher.t
+++ b/t/CaesarCipher.t
@@ -56,7 +56,7 @@ ddg_goodie_test(
'caesar -26 test\\' => build_test('test\\', -26, 'test\\'),
'caesar 5 #test{]17TEST#' => build_test('#yjxy{]17YJXY#', 5, '#test{]17TEST#'),
'Caesar cipher 26 test text.' => build_test('test text.', 26, 'test text.'),
- 'ceasar 13 "More Test Text"' => build_test('"Zber Grfg Grkg"', 13, '"More Test Text"'),
+ 'ceasar 13 "More Test Text"' => build_test('"Zber Grfg Grkg"', 13, '"More Test Text"'),
'shift cipher 7 Mxlm mxqm' => build_test('Test text', 7, 'Mxlm mxqm'),
'caesar cipher hello' => undef,
'caesar cipher' => undef,
diff --git a/t/FIGlet.t b/t/FIGlet.t
index ff5d66351..8e15eae56 100644
--- a/t/FIGlet.t
+++ b/t/FIGlet.t
@@ -157,11 +157,11 @@ ddg_goodie_test(
),
'figlet rot13 ' => test_zci(
- "</script>
+ "
",
structured_answer => {
data => {
- title => "</script>
+ title => "
",
subtitle => "Font: rot13",
},
@@ -172,11 +172,11 @@ ddg_goodie_test(
),
'figlet mnemonic ' => test_zci(
- "</script>
+ "
",
structured_answer => {
data => {
- title => "</script>
+ title => "
",
subtitle => "Font: mnemonic",
},
@@ -187,11 +187,11 @@ ddg_goodie_test(
),
'figlet term ' => test_zci(
- "</script>
+ "
",
structured_answer => {
data => {
- title => "</script>
+ title => "
",
subtitle => "Font: term",
},
diff --git a/t/IDN.t b/t/IDN.t
index c3c39914b..c46a9f4f4 100644
--- a/t/IDN.t
+++ b/t/IDN.t
@@ -20,11 +20,11 @@ ddg_goodie_test(
'internationalize domain exämple.com' =>
test_zci('Encoded internationalized domain: xn--exmple-cua.com'),
'idn xn--exmple-cua.com' =>
- test_zci('Decoded IDN: exämple.com'),
+ test_zci('Decoded IDN: exämple.com'),
'international domain xn--exmple-cua.com' =>
- test_zci('Decoded international domain: exämple.com'),
+ test_zci('Decoded international domain: exämple.com'),
'internationalized domain xn--exmple-cua.com' =>
- test_zci('Decoded internationalized domain: exämple.com'),
+ test_zci('Decoded internationalized domain: exämple.com'),
);
done_testing;
diff --git a/t/MD4.t b/t/MD4.t
index a268190c3..5d2030177 100644
--- a/t/MD4.t
+++ b/t/MD4.t
@@ -32,8 +32,8 @@ ddg_goodie_test(
'md4 hash this string' => build_test('053067f13569dab01dbb0fcbfef3dffa', "hex", "this string"),
'md4 hash of this string' => build_test('053067f13569dab01dbb0fcbfef3dffa',"hex", "this string"),
'md4 base64 this string' => build_test('BTBn8TVp2rAduw/L/vPf+g==', "base64", "this string"),
- 'md4 ' => build_test('5b9b4baf02269790c6f1c6ad0fecf55b', "hex", '<script>alert("ddg")</script>'),
- 'md4 & / " \\\' ; < >' => build_test('34a291b941a1754761cbf345d518b985', "hex", '& / " \' ; < >'),
+ 'md4 ' => build_test('5b9b4baf02269790c6f1c6ad0fecf55b', "hex", ''),
+ 'md4 & / " \\\' ; < >' => build_test('34a291b941a1754761cbf345d518b985', "hex", '& / " \\\' ; < >'),
'md5 this string' => undef,
);
diff --git a/t/MD5.t b/t/MD5.t
index 8ccf127db..389289d41 100644
--- a/t/MD5.t
+++ b/t/MD5.t
@@ -32,7 +32,7 @@ ddg_goodie_test(
'md5sum the sum of a string' => build_test('a704c8833f9850cd342ead27207ca1a1', "hex", "the sum of a string"),
'md5 of password' => build_test('5f4dcc3b5aa765d61d8327deb882cf99', "hex", "password"),
'md5sum of "this"' => build_test('9e925e9341b490bfd3b4c4ca3b0c1ef2', "hex", "this"),
- 'md5 of "this' => build_test('53d3e72f097a74f6d439fa88b91d5a71', "hex", '"this'),
+ 'md5 of "this' => build_test('53d3e72f097a74f6d439fa88b91d5a71', "hex", '"this'),
'md5 hash' => build_test('0800fc577294c34e0b28ad2839435945', "hex", "hash"),
'md5 hash ' => build_test('0800fc577294c34e0b28ad2839435945', "hex", "hash"),
'md5 hash of' => build_test('8bf8854bebe108183caeb845c7676ae4', "hex", "of"),
@@ -45,9 +45,9 @@ ddg_goodie_test(
'md5 hex "duckduckgo"' => build_test('96898bb8544fa56b03c08cdc09886c6c', "hex", "duckduckgo"),
'md5 hex base64' => build_test('95a1446a7120e4af5c0c8878abb7e6d2', "hex", "base64"),
'md5 base64 this string' => build_test('xzix7ki/mKlygQ8V94J05Q==', "base64", "this string"),
- 'md5sum ' => build_test('a595aa732b8f0b078f1ebe0860e248bf', '<script>alert("ddg")</script>', 'RIPEMD-128 hex hash'),
- q|ripemd128 & / " \\' ; < >| => build_test('34899b95c71c2d1b591f882bb04f2974', '& / " \' ; < >', 'RIPEMD-128 hex hash'),
+ 'ripemd128 ' => build_test('a595aa732b8f0b078f1ebe0860e248bf', '', 'RIPEMD-128 hex hash'),
+ q|ripemd128 & / " \\' ; < >| => build_test('34899b95c71c2d1b591f882bb04f2974', "& / \" \\' ; < >", 'RIPEMD-128 hex hash'),
'ripemd-160 this string' => build_test('33f65617195f9667673865edde5b96721d750046', 'this string', 'RIPEMD-160 hex hash',),
'ripemd-160 base64 this string' => build_test('M/ZWFxlflmdnOGXt3luWch11AEY=', 'this string', 'RIPEMD-160 b64 hash'),
'ripemd160 this string' => build_test('33f65617195f9667673865edde5b96721d750046', 'this string', 'RIPEMD-160 hex hash'),
'ripemd160sum this string' => build_test('33f65617195f9667673865edde5b96721d750046', 'this string', 'RIPEMD-160 hex hash'),
'ripemd160 "this string"' => build_test('33f65617195f9667673865edde5b96721d750046', 'this string', 'RIPEMD-160 hex hash'),
'ripemd160 hex this string' => build_test('33f65617195f9667673865edde5b96721d750046', 'this string', 'RIPEMD-160 hex hash'),
- 'ripemd160 "this and "that" string"' => build_test('ed53347ee8aeab1d994ffe7c2bdf117a05a25c3a', 'this and "that" string', 'RIPEMD-160 hex hash'),
+ 'ripemd160 "this and "that" string"' => build_test('ed53347ee8aeab1d994ffe7c2bdf117a05a25c3a', 'this and "that" string', 'RIPEMD-160 hex hash'),
'ripemd160 hash of this string' => build_test('33f65617195f9667673865edde5b96721d750046', 'this string', 'RIPEMD-160 hex hash'),
'ripemd160 base64 hash of this string' => build_test('M/ZWFxlflmdnOGXt3luWch11AEY=', 'this string', 'RIPEMD-160 b64 hash'),
- 'ripemd160 ' => build_test('6d3217e6ae7111236ddedd6a866b0921bdd9eace', '<script>alert("ddg")</script>', 'RIPEMD-160 hex hash'),
- q|ripemd160 & / " \\' ; < >| => build_test('e32a3dc548d1b1dc57e1bea093ef1837734f91be', '& / " \' ; < >', 'RIPEMD-160 hex hash'),
+ 'ripemd160 ' => build_test('6d3217e6ae7111236ddedd6a866b0921bdd9eace', '', 'RIPEMD-160 hex hash'),
+ q|ripemd160 & / " \\' ; < >| => build_test('e32a3dc548d1b1dc57e1bea093ef1837734f91be', "& / \" \\' ; < >", 'RIPEMD-160 hex hash'),
'RIPEMD-256 that' => build_test('1ff3ee2a8109caf8d33f810cfb7dccaee71824bbb18c2ac65cbf6b175ffe57d1', 'that', 'RIPEMD-256 hex hash'),
'ripemd-256 this string' => build_test('3592bc0d765e41e8855687572cfe19f44d8c18bbe0ccfddab9c8b260985ebb40', 'this string', 'RIPEMD-256 hex hash'),
'ripemd-256 base64 this string' => build_test('NZK8DXZeQeiFVodXLP4Z9E2MGLvgzP3auciyYJheu0A=', 'this string', 'RIPEMD-256 b64 hash'),
@@ -58,11 +58,11 @@ ddg_goodie_test(
'ripemd256sum this string' => build_test('3592bc0d765e41e8855687572cfe19f44d8c18bbe0ccfddab9c8b260985ebb40', 'this string', 'RIPEMD-256 hex hash'),
'ripemd256 "this string"' => build_test('3592bc0d765e41e8855687572cfe19f44d8c18bbe0ccfddab9c8b260985ebb40', 'this string', 'RIPEMD-256 hex hash'),
'ripemd256 hex this string' => build_test('3592bc0d765e41e8855687572cfe19f44d8c18bbe0ccfddab9c8b260985ebb40', 'this string', 'RIPEMD-256 hex hash'),
- 'ripemd256 "this and "that" string"' => build_test('1dc63d877763fab85f9427c89f67a6a72a75851dada6a494ed99e0fb35bdd093', 'this and "that" string', 'RIPEMD-256 hex hash'),
+ 'ripemd256 "this and "that" string"' => build_test('1dc63d877763fab85f9427c89f67a6a72a75851dada6a494ed99e0fb35bdd093', 'this and "that" string', 'RIPEMD-256 hex hash'),
'ripemd256 hash of this string' => build_test('3592bc0d765e41e8855687572cfe19f44d8c18bbe0ccfddab9c8b260985ebb40', 'this string', 'RIPEMD-256 hex hash'),
'ripemd256 base64 hash of this string' => build_test('NZK8DXZeQeiFVodXLP4Z9E2MGLvgzP3auciyYJheu0A=', 'this string', 'RIPEMD-256 b64 hash'),
- 'ripemd256 ' => build_test('a59f78f4568226e051e8b4df12746d4d631120ee6ad5b375298affc48541bdcf', '<script>alert("ddg")</script>', 'RIPEMD-256 hex hash'),
- q|ripemd256 & / " \\' ; < >| => build_test('cc93c15f26ea7ba2827f99340204b7d32ddd2ac3ad3256731a6c04882fb6da4d', '& / " \' ; < >', 'RIPEMD-256 hex hash'),
+ 'ripemd256 ' => build_test('a59f78f4568226e051e8b4df12746d4d631120ee6ad5b375298affc48541bdcf', '', 'RIPEMD-256 hex hash'),
+ q|ripemd256 & / " \\' ; < >| => build_test('cc93c15f26ea7ba2827f99340204b7d32ddd2ac3ad3256731a6c04882fb6da4d', "& / \" \\' ; < >", 'RIPEMD-256 hex hash'),
'ripemd-320 this string' => build_test('9098c0143e74a96101dda84df41dfb9ef89e6e61d5db992d77fee635512859ac84b0d6be7af2d6e6', 'this string', 'RIPEMD-320 hex hash'),
'ripemd-320 base64 this string' => build_test('kJjAFD50qWEB3ahN9B37nviebmHV25ktd/7mNVEoWayEsNa+evLW5g==', 'this string', 'RIPEMD-320 b64 hash'),
'ripemd320 this string' => build_test('9098c0143e74a96101dda84df41dfb9ef89e6e61d5db992d77fee635512859ac84b0d6be7af2d6e6', 'this string', 'RIPEMD-320 hex hash'),
@@ -70,11 +70,11 @@ ddg_goodie_test(
'ripemd320sum this string' => build_test('9098c0143e74a96101dda84df41dfb9ef89e6e61d5db992d77fee635512859ac84b0d6be7af2d6e6', 'this string', 'RIPEMD-320 hex hash'),
'ripemd320 "this string"' => build_test('9098c0143e74a96101dda84df41dfb9ef89e6e61d5db992d77fee635512859ac84b0d6be7af2d6e6', 'this string', 'RIPEMD-320 hex hash'),
'ripemd320 hex this string' => build_test('9098c0143e74a96101dda84df41dfb9ef89e6e61d5db992d77fee635512859ac84b0d6be7af2d6e6', 'this string', 'RIPEMD-320 hex hash'),
- 'ripemd320 "this and "that" string"' => build_test('6605365efa91d0739419f8bd061d126fa53bed938e1958dd193cf1156f24dd55984897b88fd3eb26', 'this and "that" string', 'RIPEMD-320 hex hash'),
+ 'ripemd320 "this and "that" string"' => build_test('6605365efa91d0739419f8bd061d126fa53bed938e1958dd193cf1156f24dd55984897b88fd3eb26', 'this and "that" string', 'RIPEMD-320 hex hash'),
'ripemd320 hash of this string' => build_test('9098c0143e74a96101dda84df41dfb9ef89e6e61d5db992d77fee635512859ac84b0d6be7af2d6e6', 'this string', 'RIPEMD-320 hex hash'),
'ripemd320 base64 hash of this string' => build_test('kJjAFD50qWEB3ahN9B37nviebmHV25ktd/7mNVEoWayEsNa+evLW5g==', 'this string', 'RIPEMD-320 b64 hash'),
- 'ripemd320 ' => build_test('371aece9feb936b50e9e7a07186203c0c363d085a5aa307ae04b3bf1d678413e6b034e1a88a2e948', '<script>alert("ddg")</script>', 'RIPEMD-320 hex hash'),
- q|ripemd320 & / " \\' ; < >| => build_test('1049653078fea2c686104216907571b7aad4ca57eba23d515c5dd8c43aa06ec112554ec4664c0e35', '& / " \' ; < >', 'RIPEMD-320 hex hash'),
+ 'ripemd320 ' => build_test('371aece9feb936b50e9e7a07186203c0c363d085a5aa307ae04b3bf1d678413e6b034e1a88a2e948', '', 'RIPEMD-320 hex hash'),
+ q|ripemd320 & / " \\' ; < >| => build_test('1049653078fea2c686104216907571b7aad4ca57eba23d515c5dd8c43aa06ec112554ec4664c0e35', "& / \" \\' ; < >", 'RIPEMD-320 hex hash'),
'ripemd512 this string' => undef,
);
diff --git a/t/Regexp.t b/t/Regexp.t
index 1096f3614..f02448da5 100644
--- a/t/Regexp.t
+++ b/t/Regexp.t
@@ -39,7 +39,7 @@ ddg_goodie_test([qw( DDG::Goodie::Regexp )],
'Full Match' => 'Harry is awesome',
'Named Capture ' => 'Harry',
'Subpattern Match 1' => 'Harry',
- }, '/(?<name>Harry|Larry) is awesome/', 'Harry is awesome'),
+ }, '/(?Harry|Larry) is awesome/', 'Harry is awesome'),
'regex /(he|she) walked away/ he walked away' => build_test({
'Full Match' => 'he walked away',
'Subpattern Match 1' => 'he',
@@ -55,7 +55,7 @@ ddg_goodie_test([qw( DDG::Goodie::Regexp )],
'Full Match' => 'DDG::Goodie::Regexp',
'Named Capture ' => 'Regexp',
'Subpattern Match 1' => 'Regexp',
- }, '/^DDG::Goodie::(?<goodie>\w+)$/', 'DDG::Goodie::Regexp'),
+ }, '/^DDG::Goodie::(?\w+)$/', 'DDG::Goodie::Regexp'),
'regexp /foo/ foo' => build_test({
'Full Match' => 'foo',
}, '/foo/', 'foo'),