Skip to content

chore: missing env stuff#233

Merged
zaniluca merged 8 commits intoproductionfrom
master
Feb 15, 2026
Merged

chore: missing env stuff#233
zaniluca merged 8 commits intoproductionfrom
master

Conversation

@zaniluca
Copy link
Owner

No description provided.

}}
textZoom={125}
onShouldStartLoadWithRequest={(event) => {
if (!/^[data:text, about:blank]/.test(event.url)) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: The regex /^[data:text, about:blank]/ incorrectly uses a character class, causing many external links in notifications to be mishandled and opened within the app's WebView.
Severity: CRITICAL

Suggested Fix

Update the regular expression to correctly match the literal strings 'data:' or 'about:blank' at the beginning of the URL. The corrected pattern should be /^(data:|about:blank)/, which uses a non-capturing group and an OR condition.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.

Location: src/screens/NotificationDetail.tsx#L61

Potential issue: The regular expression used to test URLs is incorrect. The pattern
`/^[data:text, about:blank]/` uses a character class `[]`, which matches any single
character within the brackets at the start of a string. This causes legitimate external
URLs that start with common letters like 'd', 'a', 't', or 'c' (e.g., `docs.gitlab.com`)
to be incorrectly identified as internal URLs. As a result, these external links are
loaded within the app's WebView instead of being opened in the user's external system
browser, breaking the intended navigation flow for users viewing notifications.

Did we get this right? 👍 / 👎 to inform future reviews.

@zaniluca zaniluca merged commit d312315 into production Feb 15, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant