Loading...
 
Skip to main content

Fix the wiki syntax parser to exclude closing parenthesis from the external URLs links

Status
Closed
Subject
Fix the wiki syntax parser to exclude closing parenthesis from the external URLs links
Version
18.x
21.x
23.x
24.x
25.x
Category
  • Error
Feature
Wiki Syntax (text area, parser, external wiki, etc)
Resolution status
Fixed or Solved
Submitted by
luci
Volunteered to solve
luci
Lastmod by
luci
Rating
(0)
Description

When URL is entered in a parenthesis it takes the closing one and includes it in the external link:

(E.g. Google — https://google.com/Question)

The expected result would be that the ")" is not included as part of the link.

Solution

Change line 1277 of lib/parser/parserlib.php:

Copy to clipboard
$patterns[] = "#([\n\( ])([a-z0-9]+?)://([^<,\) \n\r]+)#i";


Fixed by in 24.x: https://gitlab.com/tikiwiki/tiki/-/commit/de558ea50cdd3caeca82025943ebe8e27a9cb2d7Question

Importance
5
Easy to solve?
5
Priority
25
Demonstrate Bug on Tiki 19+
Demonstrate Bug (older Tiki versions)
Ticket ID
8124
Created
Thursday 17 March, 2022 13:34:24 UTC
by luci
LastModif
Tuesday 12 April, 2022 09:51:58 UTC


Show PHP error messages