Skip to content

Commit

Permalink
Tags followed by @ are not masked see Wunderbyte-GmbH#163
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelpollak committed Jun 24, 2021
1 parent 80104a9 commit a8924e9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion view/view_class.php
Original file line number Diff line number Diff line change
Expand Up @@ -715,7 +715,8 @@ public function mask_tags($text) {
$matches = array();
$find = array();
$replace = array();
preg_match_all('/(?:(\[\[[^\]]+\]\])|(##[^#]+##)|(%%[^%]+%%)|(#\{\{[^\}#]+\}\}#))/', $text,
// Regex to mask all known tag patterns. Patterns followed by @ are not masked.
preg_match_all('/(?:(\[\[[^\]]+\]\])(?!@)|(##[^#]+##)|(%%[^%]+%%)|(#\{\{[^\}#]+\}\}#))/', $text,
$matches, PREG_PATTERN_ORDER);
$map = array_unique($matches[0]);
foreach ($map as $index => $match) {
Expand Down

0 comments on commit a8924e9

Please sign in to comment.