https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22223
--- Comment #20 from David Cook <[email protected]> --- Consider the following code: #!/usr/bin/perl use strict; use warnings; use URI::Escape; use Template; my $one = uri_unescape('https://www.google.com/url?q=https://buttercup.pw"'); my $two = uri_unescape('https://www.google.com/url?q=https%3A%2F%2Fbuttercup.pw%22'); my $template = Template->new(); my $output; $template->process( \*DATA, { one => $one, two => $two }, \$output ); warn $output; __DATA__ [% one | url %] [% two | url %] Consider the output: https://www.google.com/url?q=https://buttercup.pw%22 https://www.google.com/url?q=https://buttercup.pw%22 Actually... while that *looks* good... that's not necessarily correct, because the "correct" URL is actually https://www.google.com/url?q=https%3A%2F%2Fbuttercup.pw%22 That said... the end-target will uri_unescape the value of the "q" key anyway, so it shouldn't matter. Plus the URI standard says you may choose not to percent encode the query component due to usability concerns... But our test cases might also be overly simplistic. I wonder if I have any real-life complex URLs for digital resources laying around... -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
