Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/mail.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2021-03-26 15:08:47 +0300
committerChristoph Wurst <christoph@winzerhof-wurst.at>2021-03-29 18:11:31 +0300
commit309cfc15147afeabac160a0d562d29de719ec897 (patch)
treeddd1b12a3de0cf4ec0e331c319036a46266d3f6b /lib/Service
parent4f80f44ccc3e94423ef8f42ceb47d5bc537f20a7 (diff)
Replace abandoned kwi urllinker with a maintained fork
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'lib/Service')
-rwxr-xr-xlib/Service/Html.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/Service/Html.php b/lib/Service/Html.php
index 29e32e628..7983b35d3 100755
--- a/lib/Service/Html.php
+++ b/lib/Service/Html.php
@@ -33,7 +33,6 @@ use HTMLPurifier_Config;
use HTMLPurifier_HTMLDefinition;
use HTMLPurifier_URIDefinition;
use HTMLPurifier_URISchemeRegistry;
-use Kwi\UrlLinker;
use OCA\Mail\Service\HtmlPurify\CidURIScheme;
use OCA\Mail\Service\HtmlPurify\TransformCSSBackground;
use OCA\Mail\Service\HtmlPurify\TransformHTMLLinks;
@@ -43,6 +42,7 @@ use OCA\Mail\Service\HtmlPurify\TransformURLScheme;
use OCP\IRequest;
use OCP\IURLGenerator;
use OCP\Util;
+use Youthweb\UrlLinker\UrlLinker;
require_once __DIR__ . '/../../vendor/cerdic/css-tidy/class.csstidy.php';
@@ -64,7 +64,10 @@ class Html {
* @return string
*/
public function convertLinks(string $data): string {
- $linker = new UrlLinker(true, false);
+ $linker = new UrlLinker([
+ 'allowFtpAddresses' => true,
+ 'allowUpperCaseUrlSchemes' => false,
+ ]);
$data = $linker->linkUrlsAndEscapeHtml($data);
$config = HTMLPurifier_Config::createDefault();