From a17b66c6dc9f767c162cf0fc5320441c5d9e8f86 Mon Sep 17 00:00:00 2001 From: Yuri Kuznetsov Date: Fri, 12 Jan 2024 14:38:31 +0200 Subject: [PATCH] revert regexp fix --- application/Espo/Services/Note.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/application/Espo/Services/Note.php b/application/Espo/Services/Note.php index 2193753e0f..2fe8d8cd9d 100644 --- a/application/Espo/Services/Note.php +++ b/application/Espo/Services/Note.php @@ -211,8 +211,10 @@ class Note extends Record $siteUrl = $this->config->getSiteUrl(); + // PhpStorm inspection highlights RegExpRedundantEscape by a mistake. + /** @noinspection RegExpRedundantEscape */ $regexp = '/' . preg_quote($siteUrl, '/') . - '(/portal|/portal/[a-zA-Z0-9]*)?/#([A-Z][a-zA-Z0-9]*)/view/([a-zA-Z0-9-]*)/'; + '(\/portal|\/portal\/[a-zA-Z0-9]*)?\/#([A-Z][a-zA-Z0-9]*)\/view\/([a-zA-Z0-9-]*)/'; $post = preg_replace($regexp, '[\2/\3](#\2/view/\3)', $post);