summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2018-10-15 08:37:18 +0200
committerRemi Collet <remi@remirepo.net>2018-10-15 08:37:18 +0200
commit54bc2eb5d567c9d8a53a6bfa634ee3761bb232a4 (patch)
tree574f7ea7fa8e5b68f98f881e549f9396781f67c2
parentb7e64eae49d0a6f656ff2df7b4c24f6fbfb65298 (diff)
add patch for PHP 7.3 from https://github.com/horde/Text_Filter/pull/1
-rw-r--r--4345913413bf411db8f4a758221e865c5fd6e4bd.patch36
-rw-r--r--php-horde-Horde-Text-Filter.spec13
2 files changed, 47 insertions, 2 deletions
diff --git a/4345913413bf411db8f4a758221e865c5fd6e4bd.patch b/4345913413bf411db8f4a758221e865c5fd6e4bd.patch
new file mode 100644
index 0000000..b10e5bf
--- /dev/null
+++ b/4345913413bf411db8f4a758221e865c5fd6e4bd.patch
@@ -0,0 +1,36 @@
+From 4345913413bf411db8f4a758221e865c5fd6e4bd Mon Sep 17 00:00:00 2001
+From: Remi Collet <remi@remirepo.net>
+Date: Mon, 15 Oct 2018 08:28:23 +0200
+Subject: [PATCH] protect the -, this is not a range
+
+---
+ lib/Horde/Text/Filter/Emails.php | 2 +-
+ lib/Horde/Text/Filter/Linkurls.php | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/lib/Horde/Text/Filter/Emails.php b/lib/Horde/Text/Filter/Emails.php
+index 49468ab..86447fc 100644
+--- a/lib/Horde/Text/Filter/Emails.php
++++ b/lib/Horde/Text/Filter/Emails.php
+@@ -61,7 +61,7 @@ public function getPatterns()
+ ((?(1)\s*\]))
+ |
+ # Version 2 Pattern 9 and 10: simple email addresses.
+- (^|\s|&lt;|<|\[)([\w-+.=]+@[-A-Z0-9.]*[A-Z0-9])
++ (^|\s|&lt;|<|\[)([\w\-+.=]+@[-A-Z0-9.]*[A-Z0-9])
+ # Pattern 11 to 13: Optional parameters
+ ((\?)([^\s"<]*[\w+#?\/&=]))?
+ # Pattern 14: Optional closing bracket
+diff --git a/lib/Horde/Text/Filter/Linkurls.php b/lib/Horde/Text/Filter/Linkurls.php
+index ceb9134..f579587 100644
+--- a/lib/Horde/Text/Filter/Linkurls.php
++++ b/lib/Horde/Text/Filter/Linkurls.php
+@@ -86,7 +86,7 @@ public static function initializeRegex()
+ (?:\b|^)
+ ( # Capture 1: entire matched URL
+ (
+- (?:[a-z][\w-+]{0,19})?:/{1,3} # URL protocol and colon followed by 1-3
++ (?:[a-z][\w\-+]{0,19})?:/{1,3} # URL protocol and colon followed by 1-3
+ # slashes, or just colon and slashes (://)
+ | # - or -
+ (?<!\.)www\d{0,3}\. # "www.", "www1.", "www2." … "www999."
diff --git a/php-horde-Horde-Text-Filter.spec b/php-horde-Horde-Text-Filter.spec
index 49f6e3f..3fca19f 100644
--- a/php-horde-Horde-Text-Filter.spec
+++ b/php-horde-Horde-Text-Filter.spec
@@ -13,7 +13,7 @@
Name: php-horde-Horde-Text-Filter
Version: 2.3.5
-Release: 1%{?dist}
+Release: 6%{?dist}
Summary: Horde Text Filter API
Group: Development/Libraries
@@ -21,6 +21,9 @@ License: LGPLv2
URL: http://%{pear_channel}/
Source0: http://%{pear_channel}/get/%{pear_name}-%{version}.tgz
+# from https://github.com/horde/Text_Filter/pull/1
+Patch0: https://github.com/horde/Text_Filter/commit/4345913413bf411db8f4a758221e865c5fd6e4bd.patch
+
BuildArch: noarch
BuildRequires: php(language) >= 5.3.0
BuildRequires: php-pear(PEAR) >= 1.7.0
@@ -63,11 +66,14 @@ Common methods for fitering and converting text.
%prep
%setup -q -c
cd %{pear_name}-%{version}
+%patch0 -p1
# Don't install .po and .pot files
# Remove checksum for .mo, as we regenerate them
sed -e '/%{pear_name}.po/d' \
-e '/Horde_Other.po/d' \
+ -e '/Emails.php/s/md5sum=.*name=/name=/' \
+ -e '/Linkurls.php/s/md5sum=.*name=/name=/' \
-e '/%{pear_name}.mo/s/md5sum=.*name=/name=/' \
../package.xml >%{name}.xml
touch -r ../package.xml %{name}.xml
@@ -116,7 +122,7 @@ sed -e 's/testMsoNormalCss/SKIP_testMsoNormalCss/' \
%endif
ret=0
-for cmd in php php56 php70 php71 php72; do
+for cmd in php php56 php70 php71 php72 php73; do
if which $cmd; then
$cmd %{_bindir}/phpunit --verbose . || ret=1
fi
@@ -148,6 +154,9 @@ fi
%changelog
+* Mon Oct 15 2018 Remi Collet <remi@fedoraproject.org> - 2.3.5-6
+- add patch for PHP 7.3 from https://github.com/horde/Text_Filter/pull/1
+
* Wed Sep 07 2016 Remi Collet <remi@fedoraproject.org> - 2.3.5-1
- Update to 2.3.5