Merge pull request #4079 from humhub/fix/4078

Fix #4078: Richtext linkextension pattern fails on link extensions wi…
This commit is contained in:
buddh4 2020-05-13 14:19:45 +02:00 committed by GitHub
commit fb497abe87
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -8,6 +8,7 @@ HumHub Change Log
- Fix #4038: Cannot use yii\helpers\Html as Html because the name is already in use in ProfileBannerImage - Fix #4038: Cannot use yii\helpers\Html as Html because the name is already in use in ProfileBannerImage
- Fix #4050: Broken Cron-job documentation link used in cron info sidebar snippet - Fix #4050: Broken Cron-job documentation link used in cron info sidebar snippet
- Fix #4036: Uploaded photos are not rotated correctly - Fix #4036: Uploaded photos are not rotated correctly
- Fix #4078: Richtext linkextension pattern fails on link extensions with containing `)` in link title
1.5.1 (April 19, 2020) 1.5.1 (April 19, 2020)
---------------------- ----------------------

View File

@ -291,7 +291,7 @@ class ProsemirrorRichText extends AbstractRichText
*/ */
protected static function getLinkExtensionPattern($extension = '[a-zA-Z]+') protected static function getLinkExtensionPattern($extension = '[a-zA-Z]+')
{ {
return '/(?<!\\\\)\[([^\]]*)\]\(('.$extension.'):{1}([^\)\s]*)(?:\s")?([^\)"]*)?(?:")?[^\)]*\)/is'; return '/(?<!\\\\)\[([^\]]*)\]\(('.$extension.'):{1}([^\)\s]*)(?:\s")?([^"]*)?(?:")?[^\)]*\)/is';
} }
/** /**