From 40f741f7debd5bd7491edb52ecc41755a1e6f4c4 Mon Sep 17 00:00:00 2001 From: George Clark Date: Sat, 16 Dec 2017 09:47:28 -0500 Subject: [PATCH 1/4] Item14138: Latest email module quotes names Allow for optional quotes in the email addresses. --- UnitTestContrib/test/unit/RegisterTests.pm | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/UnitTestContrib/test/unit/RegisterTests.pm b/UnitTestContrib/test/unit/RegisterTests.pm index 9a4a608895..a1b44e8f68 100644 --- a/UnitTestContrib/test/unit/RegisterTests.pm +++ b/UnitTestContrib/test/unit/RegisterTests.pm @@ -234,7 +234,7 @@ sub registerAccount { } else { $this->assert_matches( -qr/$Foswiki::cfg{WebMasterName} <$Foswiki::cfg{WebMasterEmail}>/, +qr/"?$Foswiki::cfg{WebMasterName}"? <$Foswiki::cfg{WebMasterEmail}>/, $mail->header('To') ); } @@ -796,7 +796,7 @@ sub _registerBadVerify { $this->assert_equals( 1, scalar(@FoswikiFnTestCase::mails) ); my $mess = $FoswikiFnTestCase::mails[0]; $this->assert_matches( - qr/$Foswiki::cfg{WebMasterName} <$Foswiki::cfg{WebMasterEmail}>/, + qr/"?$Foswiki::cfg{WebMasterName}"? <$Foswiki::cfg{WebMasterEmail}>/, $mess->header('From') ); $this->assert_matches( qr/.*\b$this->{new_user_email}\b/, $mess->header('To') ); @@ -869,7 +869,7 @@ sub _registerNoVerifyOk { } else { $this->assert_matches( -qr/$Foswiki::cfg{WebMasterName} <$Foswiki::cfg{WebMasterEmail}>/, +qr/"?$Foswiki::cfg{WebMasterName}"? <$Foswiki::cfg{WebMasterEmail}>/, $mail->header('To') ); } @@ -1212,7 +1212,7 @@ sub verify_rejectDuplicateEmail { } else { $this->assert_matches( -qr/$Foswiki::cfg{WebMasterName} <$Foswiki::cfg{WebMasterEmail}>/, +qr/"?$Foswiki::cfg{WebMasterName}"? <$Foswiki::cfg{WebMasterEmail}>/, $mail->header('To') ); } @@ -1474,7 +1474,7 @@ sub verify_rejectFilteredEmail { } else { $this->assert_matches( -qr/$Foswiki::cfg{WebMasterName} <$Foswiki::cfg{WebMasterEmail}>/, +qr/"?$Foswiki::cfg{WebMasterName}"? <$Foswiki::cfg{WebMasterEmail}>/, $mail->header('To') ); } @@ -1810,7 +1810,7 @@ sub verify_resetPasswordOkay { $this->assert_equals( 1, scalar(@FoswikiFnTestCase::mails) ); my $mess = $FoswikiFnTestCase::mails[0]; $this->assert_matches( - qr/$Foswiki::cfg{WebMasterName} <$Foswiki::cfg{WebMasterEmail}>/, + qr/"?$Foswiki::cfg{WebMasterName}"? <$Foswiki::cfg{WebMasterEmail}>/, $mess->header('From') ); $this->assert_matches( qr/.*\b$this->{new_user_email}/, $mess->header('To') ); @@ -2624,7 +2624,7 @@ sub verify_resetPassword_NoWikiUsersEntry { $this->assert_equals( 1, scalar(@FoswikiFnTestCase::mails) ); my $mess = $FoswikiFnTestCase::mails[0]; $this->assert_matches( - qr/$Foswiki::cfg{WebMasterName} <$Foswiki::cfg{WebMasterEmail}>/, + qr/"?$Foswiki::cfg{WebMasterName}"? <$Foswiki::cfg{WebMasterEmail}>/, $mess->header('From') ); $this->assert_matches( qr/.*\b$this->{new_user_email}/, $mess->header('To') ); @@ -3028,12 +3028,12 @@ sub verify_registerVerifyOKApproved { # Make sure the confirmations are sent; one to the user, one to the admin $this->assert_equals( 2, scalar(@FoswikiFnTestCase::mails) ); foreach my $mail (@FoswikiFnTestCase::mails) { - if ( $mail->header('To') =~ m/^Wiki/m ) { - $this->assert_matches( qr/^Wiki Administrator/m, + if ( $mail->header('To') =~ m/^"?Wiki/m ) { + $this->assert_matches( qr/^"?Wiki Administrator"?/m, $mail->header('To') ); } else { - $this->assert_matches( qr/^Walter Pigeon/m, + $this->assert_matches( qr/^"?Walter Pigeon"?/m, $mail->header('To') ); } $this->assert_matches( From 6add2d0b136169c506f837bc59af809bf50a52af Mon Sep 17 00:00:00 2001 From: George Clark Date: Sat, 16 Dec 2017 10:40:16 -0500 Subject: [PATCH 2/4] Item13883: Broken link in release notes. --- core/data/System/ReleaseNotes02x01.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/data/System/ReleaseNotes02x01.txt b/core/data/System/ReleaseNotes02x01.txt index d780ff86c1..eb0de978e3 100644 --- a/core/data/System/ReleaseNotes02x01.txt +++ b/core/data/System/ReleaseNotes02x01.txt @@ -1,4 +1,4 @@ -%META:TOPICINFO{author="ProjectContributor" date="1513393570" format="1.1" version="1"}% +%META:TOPICINFO{author="ProjectContributor" date="1513438812" format="1.1" version="1"}% %META:TOPICPARENT{name="ReleaseHistory"}% ---+!! Foswiki Release 2.1.5-Beta1 @@ -573,7 +573,7 @@ Foswiki thanks the Translators for their efforts. If you are interesting in hel | [[%BUGS%/Item14554][Item14554]] | Remove link to unused wikiring.com domain. | | [[%BUGS%/Item14556][Item14556]] | Clean up page header area with PatternSkin. | | [[%BUGS%/Item14557][Item14557]] | PerlDependencyReport crashes under some conditions. | -| [[%BUGS%/Item14559][Item14559]] | Regression via [[Tasks.Item13898][Item13898]] - broken topic selectors. | +| [[%BUGS%/Item14559][Item14559]] | Regression via Item13898 - broken topic selectors. | | [[%BUGS%/Item14560][Item14560]] | WikiWord changes don't trigger a change event on the target element. | | [[%BUGS%/Item14566][Item14566]] | Don't cache a null result in foswiki.getPreference(). | | [[%BUGS%/Item14573][Item14573]] | Fix auto-height calculation of tabpane. | From 1ae80067eaab70076650262165b3fb1d7c2005c3 Mon Sep 17 00:00:00 2001 From: George Clark Date: Sat, 16 Dec 2017 10:59:36 -0500 Subject: [PATCH 3/4] Item000: Build Foswiki 2.1.5 Beta1 --- core/lib/Foswiki.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/lib/Foswiki.pm b/core/lib/Foswiki.pm index 82af4b2764..9e6f9ca149 100644 --- a/core/lib/Foswiki.pm +++ b/core/lib/Foswiki.pm @@ -211,8 +211,8 @@ BEGIN { # DO NOT CHANGE THE FORMAT OF $VERSION. # Use $RELEASE for a descriptive version. - use version 0.77; $VERSION = version->declare('v2.1.4'); - $RELEASE = 'Foswiki-2.1.4'; + use version 0.77; $VERSION = version->declare('v2.1.4_001'); + $RELEASE = 'Foswiki-2.1.5-Beta1'; # Default handlers for different %TAGS% # Where an entry is set as 'undef', the tag will be demand-loaded From 704791e9669b604b96a11f39f467c095b42cbad0 Mon Sep 17 00:00:00 2001 From: MichaelDaum Date: Sun, 17 Dec 2017 18:00:41 +0100 Subject: [PATCH 4/4] Item14584: make wikiword backwards compatible --- JQueryPlugin/lib/Foswiki/Plugins/JQueryPlugin/WIKIWORD.pm | 2 +- .../plugins/wikiword/jquery.wikiword.uncompressed.js | 7 ++++++- .../JQueryPlugin/plugins/wikiword/wikiword.uncompressed.js | 7 ++++++- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/JQueryPlugin/lib/Foswiki/Plugins/JQueryPlugin/WIKIWORD.pm b/JQueryPlugin/lib/Foswiki/Plugins/JQueryPlugin/WIKIWORD.pm index b40ee351b9..e513e3a572 100644 --- a/JQueryPlugin/lib/Foswiki/Plugins/JQueryPlugin/WIKIWORD.pm +++ b/JQueryPlugin/lib/Foswiki/Plugins/JQueryPlugin/WIKIWORD.pm @@ -28,7 +28,7 @@ sub new { my $this = bless( $class->SUPER::new( name => 'WikiWord', - version => '3.20', + version => '3.21', author => 'Michael Daum', homepage => 'http://foswiki.org/Extensions/JQueryPlugin', javascript => ['wikiword.js'], diff --git a/JQueryPlugin/pub/System/JQueryPlugin/plugins/wikiword/jquery.wikiword.uncompressed.js b/JQueryPlugin/pub/System/JQueryPlugin/plugins/wikiword/jquery.wikiword.uncompressed.js index 260f28183a..de54821117 100644 --- a/JQueryPlugin/pub/System/JQueryPlugin/plugins/wikiword/jquery.wikiword.uncompressed.js +++ b/JQueryPlugin/pub/System/JQueryPlugin/plugins/wikiword/jquery.wikiword.uncompressed.js @@ -1,5 +1,5 @@ /* - * jQuery WikiWord plugin 3.20 + * jQuery WikiWord plugin 3.21 * * Copyright (c) 2008-2017 Foswiki Contributors http://foswiki.org * @@ -42,7 +42,12 @@ $.wikiword = { // either a string or a jQuery object if (typeof(thisOpts.source) === 'string') { + // first try to find the source within the same form $source = $this.parents("form:first").find(thisOpts.source); + // if that fails, try in a global scope + if ($source.length === 0) { + $source = $(thisOpts.source); + } } else { $source = thisOpts.source; } diff --git a/JQueryPlugin/pub/System/JQueryPlugin/plugins/wikiword/wikiword.uncompressed.js b/JQueryPlugin/pub/System/JQueryPlugin/plugins/wikiword/wikiword.uncompressed.js index adcdb73f86..a8d341da31 100644 --- a/JQueryPlugin/pub/System/JQueryPlugin/plugins/wikiword/wikiword.uncompressed.js +++ b/JQueryPlugin/pub/System/JQueryPlugin/plugins/wikiword/wikiword.uncompressed.js @@ -1,5 +1,5 @@ /* - * jQuery WikiWord plugin 3.20 + * jQuery WikiWord plugin 3.21 * * Copyright (c) 2008-2017 Foswiki Contributors http://foswiki.org * @@ -42,7 +42,12 @@ $.wikiword = { // either a string or a jQuery object if (typeof(thisOpts.source) === 'string') { + // first try to find the source within the same form $source = $this.parents("form:first").find(thisOpts.source); + // if that fails, try in a global scope + if ($source.length === 0) { + $source = $(thisOpts.source); + } } else { $source = thisOpts.source; }