N°6284 - fix regex

This commit is contained in:
jf-cbd
2025-01-21 17:41:53 +01:00
parent 2852d8ce49
commit 470f145747
2 changed files with 2 additions and 3 deletions

View File

@@ -3110,8 +3110,7 @@ TXT
$aMentionMatches = [];
$sText = html_entity_decode($sText);
preg_match_all('/<a\s*([^>]*)data-object-class="([^"]*)"\s*data-object-key="([^"]*)"/i', $sText, $aMentionMatches);
preg_match_all('/<a\s*([^>]*)data-object-class="([^"]*)"\s.*data-object-key="([^"]*)"/Ui', $sText, $aMentionMatches);
foreach ($aMentionMatches[0] as $iMatchIdx => $sCompleteMatch) {
$sMatchedClass = $aMentionMatches[2][$iMatchIdx];
$sMatchedId = $aMentionMatches[3][$iMatchIdx];