Hi Krileon, hi JoomlaPolis Team.
I'd like to report two related issues with CB Activity (itegrated into CB GroupJive) link detection in the contenteditable input field (posts and comments).
Environment:
- Community Builder 2.11.0
- CB Activity (latest build)
- Joomla 5.4.3
- Links display enables in Comment Streams
Issue 1 — Leading/trailing whitespace breaks link detection
When a user pastes a URL that contains a leading or trailing space (which commonly happens when selecting/copying text), CB Activity does not detect it as a clickable link. The URL remains plain text with no link preview.
The only workaround is to manually edit a character in the URL (e.g. remove and retype the "s" in "https") to re-trigger the link parser.
A simple trim() on the pasted content before link detection would solve this.
Issue 2 — Pasting text containing an embedded hyperlink is treated as plain text
When a user copies a block of text that contains a hyperlink (e.g. from a CB Activity post, a web page, or a document) and pastes it into a comment or post field, the entire content — including the URL — is pasted as plain text. The link parser does not detect the URL within the pasted content.
This seems to happen because the paste event inserts the clipboard's HTML as plain text into the contenteditable div, but the link detection regex only runs on direct keyboard input or clean URL-only pastes — not on mixed text+URL paste content.
Steps to reproduce (Issue 2):
1. Create a post containing some text and a URL (the URL becomes a clickable link with preview as expected)
2. Select and copy the full text of that post (text + link)
3. Paste it into a new comment or post field
4. Result: everything appears as plain text, the URL is not detected as a link
Expected behavior:
The link parser should scan pasted content for URLs and convert them to clickable links, regardless of whether the paste contains only a URL or mixed text+URL content.
I searched the forums and couldn't find this issue reported before. I will be happy to provide screenshots or additional details if needed.
Thanks for your excellent work on CB Activity and CB in general !
Best regards,
Max.