Hello community,
here is the log from the commit of package perl-Mojolicious for openSUSE:Factory checked in at 2017-03-18 20:47:28
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-Mojolicious (Old)
and /work/SRC/openSUSE:Factory/.perl-Mojolicious.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-Mojolicious"
Sat Mar 18 20:47:28 2017 rev:65 rq:479452 version:7.29
Changes:
--------
--- /work/SRC/openSUSE:Factory/perl-Mojolicious/perl-Mojolicious.changes 2017-03-13 15:28:02.472426173 +0100
+++ /work/SRC/openSUSE:Factory/.perl-Mojolicious.new/perl-Mojolicious.changes 2017-03-18 20:47:31.255630468 +0100
@@ -1,0 +2,12 @@
+Wed Mar 15 07:19:20 UTC 2017 - coolo@suse.com
+
+- updated to 7.29
+ see /usr/share/doc/packages/perl-Mojolicious/Changes
+
+ 7.29 2017-03-12
+ - Added support for overriding configuration files in applications tested with
+ Test::Mojo.
+ - Added html_attr_unescape function to Mojo::Util.
+ - Fixed unescaping of HTML5 attribute values in Mojo::DOM::HTML.
+
+-------------------------------------------------------------------
Old:
----
Mojolicious-7.28.tar.gz
New:
----
Mojolicious-7.29.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ perl-Mojolicious.spec ++++++
--- /var/tmp/diff_new_pack.IXEbZD/_old 2017-03-18 20:47:32.347475787 +0100
+++ /var/tmp/diff_new_pack.IXEbZD/_new 2017-03-18 20:47:32.351475220 +0100
@@ -17,7 +17,7 @@
Name: perl-Mojolicious
-Version: 7.28
+Version: 7.29
Release: 0
%define cpan_name Mojolicious
Summary: Real-time web framework
++++++ Mojolicious-7.28.tar.gz -> Mojolicious-7.29.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-7.28/Changes new/Mojolicious-7.29/Changes
--- old/Mojolicious-7.28/Changes 2017-03-07 22:17:16.000000000 +0100
+++ new/Mojolicious-7.29/Changes 2017-03-12 13:14:41.000000000 +0100
@@ -1,4 +1,10 @@
+7.29 2017-03-12
+ - Added support for overriding configuration files in applications tested with
+ Test::Mojo.
+ - Added html_attr_unescape function to Mojo::Util.
+ - Fixed unescaping of HTML5 attribute values in Mojo::DOM::HTML.
+
7.28 2017-03-07
- Added copy_to, realpath and sibling methods to Mojo::File.
- Added dir option to list_tree method in Mojo::File.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-7.28/META.json new/Mojolicious-7.29/META.json
--- old/Mojolicious-7.28/META.json 2017-03-07 22:35:59.000000000 +0100
+++ new/Mojolicious-7.29/META.json 2017-03-15 00:27:16.000000000 +0100
@@ -58,6 +58,6 @@
},
"x_IRC" : "irc://irc.perl.org/#mojo"
},
- "version" : "7.28",
+ "version" : "7.29",
"x_serialization_backend" : "JSON::PP version 2.27400"
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-7.28/META.yml new/Mojolicious-7.29/META.yml
--- old/Mojolicious-7.28/META.yml 2017-03-07 22:35:59.000000000 +0100
+++ new/Mojolicious-7.29/META.yml 2017-03-15 00:27:16.000000000 +0100
@@ -31,5 +31,5 @@
homepage: http://mojolicious.org
license: http://www.opensource.org/licenses/artistic-license-2.0
repository: https://github.com/kraih/mojo.git
-version: '7.28'
+version: '7.29'
x_serialization_backend: 'CPAN::Meta::YAML version 0.018'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-7.28/lib/Mojo/DOM/HTML.pm new/Mojolicious-7.29/lib/Mojo/DOM/HTML.pm
--- old/Mojolicious-7.28/lib/Mojo/DOM/HTML.pm 2016-07-19 02:38:18.000000000 +0200
+++ new/Mojolicious-7.29/lib/Mojo/DOM/HTML.pm 2017-03-09 21:14:29.000000000 +0100
@@ -1,7 +1,7 @@
package Mojo::DOM::HTML;
use Mojo::Base -base;
-use Mojo::Util qw(html_unescape xml_escape);
+use Mojo::Util qw(html_attr_unescape html_unescape xml_escape);
use Scalar::Util 'weaken';
has tree => sub { ['root'] };
@@ -125,7 +125,7 @@
# Empty tag
++$closing and next if $key eq '/';
- $attrs{$key} = defined $value ? html_unescape $value : $value;
+ $attrs{$key} = defined $value ? html_attr_unescape $value : $value;
}
# "image" is an alias for "img"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-7.28/lib/Mojo/Server.pm new/Mojolicious-7.29/lib/Mojo/Server.pm
--- old/Mojolicious-7.28/lib/Mojo/Server.pm 2017-01-26 00:07:47.000000000 +0100
+++ new/Mojolicious-7.29/lib/Mojo/Server.pm 2017-03-12 13:05:42.000000000 +0100
@@ -12,9 +12,9 @@
has reverse_proxy => sub { $ENV{MOJO_REVERSE_PROXY} };
sub build_app {
- my ($self, $app) = @_;
+ my ($self, $app) = (shift, shift);
local $ENV{MOJO_EXE};
- return $self->app($app->new)->app unless my $e = load_class $app;
+ return $self->app($app->new(@_))->app unless my $e = load_class $app;
die ref $e ? $e : qq{Can't find application class "$app" in \@INC. (@INC)\n};
}
@@ -150,6 +150,8 @@
=head2 build_app
my $app = $server->build_app('MyApp');
+ my $app = $server->build_app('MyApp', log => Mojo::Log->new);
+ my $app = $server->build_app('MyApp', {log => Mojo::Log->new});
Build application from class and assign it to L"app">.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Mojolicious-7.28/lib/Mojo/Util.pm new/Mojolicious-7.29/lib/Mojo/Util.pm
--- old/Mojolicious-7.28/lib/Mojo/Util.pm 2017-01-19 21:14:59.000000000 +0100
+++ new/Mojolicious-7.29/lib/Mojo/Util.pm 2017-03-09 21:03:15.000000000 +0100
@@ -51,14 +51,17 @@
# "Sun, 06 Nov 1994 08:49:37 GMT" and "Sunday, 06-Nov-94 08:49:37 GMT"
my $EXPIRES_RE = qr/(\w+\W+\d+\W+\w+\W+\d+\W+\d+:\d+:\d+\W*\w+)/;
+# HTML entities
+my $ENTITY_RE = qr/&(?:\#((?:[0-9]{1,7}|x[0-9a-fA-F]{1,6}));|(\w+[;=]?))/;
+
# Encoding cache
my %CACHE;
our @EXPORT_OK = (
qw(b64_decode b64_encode camelize class_to_file class_to_path decamelize),
qw(decode deprecated dumper encode extract_usage getopt hmac_sha1_sum),
- qw(html_unescape md5_bytes md5_sum monkey_patch punycode_decode),
- qw(punycode_encode quote secure_compare sha1_bytes sha1_sum),
+ qw(html_attr_unescape html_unescape md5_bytes md5_sum monkey_patch),
+ qw(punycode_decode punycode_encode quote secure_compare sha1_bytes sha1_sum),
qw(split_cookie_header split_header steady_time tablify term_escape trim),
qw(unindent unquote url_escape url_unescape xml_escape xor_encode)
);
@@ -155,12 +158,8 @@
Getopt::Long::Configure($save);
}
-sub html_unescape {
- my $str = shift;
- $str
- =~ s/&(?:\#((?:[0-9]{1,7}|x[0-9a-fA-F]{1,6}));|(\w+;?))/_decode($1, $2)/ge;
- return $str;
-}
+sub html_attr_unescape { _html(shift, 1) }
+sub html_unescape { _html(shift, 0) }
# Declared in Mojo::Base to avoid circular require problems
sub monkey_patch { Mojo::Base::_monkey_patch(@_) }
@@ -367,25 +366,27 @@
return $k + (((PC_BASE - PC_TMIN + 1) * $delta) / ($delta + PC_SKEW));
}
-sub _decode {
- my ($point, $name) = @_;
+sub _encoding {
+ $CACHE{$_[0]} //= find_encoding($_[0]) // croak "Unknown encoding '$_[0]'";
+}
+
+sub _entity {
+ my ($point, $name, $attr) = @_;
# Code point
return chr($point !~ /^x/ ? $point : hex $point) unless defined $name;
# Named character reference
- my $rest = '';
+ my $rest = my $last = '';
while (length $name) {
- return $ENTITIES{$name} . reverse $rest if exists $ENTITIES{$name};
- $rest .= chop $name;
+ return $ENTITIES{$name} . reverse $rest
+ if exists $ENTITIES{$name}
+ && (!$attr || $name =~ /;$/ || $last !~ /[A-Za-z0-9=]/);
+ $rest .= $last = chop $name;
}
return '&' . reverse $rest;
}
-sub _encoding {
- $CACHE{$_[0]} //= find_encoding($_[0]) // croak "Unknown encoding '$_[0]'";
-}
-
# Supported on Perl 5.14+
sub _global_destruction {
defined ${^GLOBAL_PHASE} && ${^GLOBAL_PHASE} eq 'DESTRUCT';
@@ -418,6 +419,12 @@
return [@part ? (@tree, \@part) : @tree];
}
+sub _html {
+ my ($str, $attr) = @_;
+ $str =~ s/$ENTITY_RE/_entity($1, $2, $attr)/geo;
+ return $str;
+}
+
sub _options {
# Hash or name (one)
@@ -631,6 +638,19 @@
# "11cedfd5ec11adc0ec234466d8a0f2a83736aa68"
hmac_sha1_sum 'foo', 'passw0rd';
+=head2 html_attr_unescape
+
+ my $str = html_attr_unescape $escaped;
+
+Same as L"html_unescape">, but handles special rules from the
+Lhttps://html.spec.whatwg.org> for HTML attributes.
+
+ # "foo=bar<est=baz"
+ html_attr_unescape 'foo=bar<est=baz';
+
+ # "foo=bar