Fix #4078: Richtext linkextension pattern fails on link extensions with containing ) in link title

This commit is contained in:
buddh4 2020-05-13 14:18:35 +02:00
parent c39054b55f
commit 294ba85015
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 #4050: Broken Cron-job documentation link used in cron info sidebar snippet
- 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)
----------------------

View File

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