Bug #86921
closed
Linkvalidator reports exception on links with tilde (~)
Added by Sybille Peters about 6 years ago.
Updated almost 5 years ago.
Description
Error message: Exception: NAMEPREP: Prohibited input U+0000007E
Use a link with tilde
TYPO3 version: 9-dev (master)
- Related to Bug #85069: Linkvalidator reports links to pages with certain cookie-alerts as broken added
- Related to Bug #80139: Tilde in base URL causes exception added
Following the discussion with idna_convert guys, it is linkvalidator, who calls a wrong method. Here is a patch:
--- a/typo3/sysext/linkvalidator/Classes/Linktype/ExternalLinktype.php
+++ b/typo3/sysext/linkvalidator/Classes/Linktype/ExternalLinktype.php
@@ -209,7 +209,7 @@
protected function preprocessUrl(string $url): string
{
try {
- return (new IdnaConvert())->encode($url);
+ return (new IdnaConvert())->encodeUri($url);
} catch (\Exception $e) {
// in case of any error, return empty url.
$this->errorParams['errorType'] = 'exception';
- Status changed from New to Under Review
The fix is contributed by the University of Basel.
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
- Status changed from Resolved to Closed
Also available in: Atom
PDF