Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix go service for multiline links #42

Merged
merged 1 commit into from
Jun 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
Changelog
=========

2.0.4 (Unreleased)
---------------------
- Fix #41: Fix go service for multiline links

2.0.3 (June 24, 2024)
---------------------
- Enh: Endpoint to test push status
Expand Down
2 changes: 1 addition & 1 deletion module.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
"humhub": {
"minVersion": "1.14"
},
"version": "2.0.3",
"version": "2.0.4",
"screenshots": []
}
2 changes: 1 addition & 1 deletion services/GoService.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ private function callbackReplaceUrl($matches)
public function processLinks($text): ?string
{
return $this->isConfigured()
? preg_replace_callback('#(<a.+?href=")(' . $this->sitePattern . '.+?)(".*?>)#i', [$this, 'callbackReplaceLink'], $text)
? preg_replace_callback('#(<a.+?href=")(' . $this->sitePattern . '.+?)(".*?>)#is', [$this, 'callbackReplaceLink'], $text)
: $text;
}

Expand Down