diff --git a/src/Services/Parameters/ParameterExtractor.php b/src/Services/Parameters/ParameterExtractor.php index 9eaf946a..a133b282 100644 --- a/src/Services/Parameters/ParameterExtractor.php +++ b/src/Services/Parameters/ParameterExtractor.php @@ -88,7 +88,7 @@ class ParameterExtractor protected function stringToParam(string $input, string $class): ?AbstractParameter { $input = trim($input); - $regex = '/^(.*) *(?:=|:) *(.+)/u'; + $regex = '/^(.*) *(?:=|:)(?!\/) *(.+)/u'; $matches = []; preg_match($regex, $input, $matches); diff --git a/tests/Services/Parameters/ParameterExtractorTest.php b/tests/Services/Parameters/ParameterExtractorTest.php index e82d99af..842f8b80 100644 --- a/tests/Services/Parameters/ParameterExtractorTest.php +++ b/tests/Services/Parameters/ParameterExtractorTest.php @@ -67,6 +67,7 @@ class ParameterExtractorTest extends WebTestCase ['=BC547 rewr'], ['For good, [b]bad[/b], evil'], ['Param:; Test'], + ['A [link](https://demo.part-db.de) should not be matched'] ]; }