Skip to content

Commit

Permalink
fix: update mail display pattern to match
Browse files Browse the repository at this point in the history
  • Loading branch information
ger4003 committed Oct 30, 2024
1 parent 2d8f3d5 commit a8bb889
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Resources/Private/Fusion/Prototype/MailObfuscator.fusion
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ prototype(Networkteam.Neos:MailObfuscator) {
@class = 'Networkteam\\Neos\\MailObfuscator\\Fusion\\ConvertEmailLinksImplementation'

patternMailTo = '/(href=")mailto:([^"]*)/'
patternMailDisplay = '|(href="mailto:[^>]*>)(.*)(<\/a>)|'
patternMailDisplay = '|(href="mailto:[^>]*>)(.*?)(<\/a>)|'

value = ${value}
node = ${node}
Expand Down
4 changes: 2 additions & 2 deletions Tests/Unit/Fusion/ConvertEmailLinksImplementationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,14 +77,14 @@ public function emailsAreConverted($rawText, $expectedText)
->will($this->returnValueMap([
['value', $rawText],
['patternMailTo', '/(href=")mailto:([^"]*)/'],
['patternMailDisplay', '|(href="mailto:[^>]*>)(.*)(<\/a>)|']
['patternMailDisplay', '|(href="mailto:[^>]*>)(.*?)(<\/a>)|']
]));

$actualResult = $this->convertEmailLinks->evaluate();
$this->assertSame($expectedText, $actualResult);
}

public function emailTexts(): array
static public function emailTexts(): array
{

$htmlEncodedDecryptionString = htmlspecialchars('javascript:linkTo_UnCryptMailto(\'ithiOtmpbeat-rdb\',-15)', ENT_NOQUOTES);
Expand Down

0 comments on commit a8bb889

Please sign in to comment.