improvement(mothership): tool display titles, html sanitization, and ui fixes#3631
Merged
waleedlatif1 merged 2 commits intostagingfrom Mar 17, 2026
Merged
improvement(mothership): tool display titles, html sanitization, and ui fixes#3631waleedlatif1 merged 2 commits intostagingfrom
waleedlatif1 merged 2 commits intostagingfrom
Conversation
…ui fixes - Use TOOL_UI_METADATA as fallback for tool display titles (fast_edit shows "Editing workflow" instead of "Fast Edit") - Harden HTML-to-text extraction with replaceUntilStable to prevent nested tag injection - Decode HTML entities in a single pass to avoid double-unescaping - Fix Google Drive/Docs query escaping for backslashes in folder IDs - Replace regex with indexOf for email sender/display name parsing - Update embedded workflow run tooltip to "Run workflow"
|
You have used all Bugbot PR reviews included in your free trial for your GitHub account on this workspace. To continue using Bugbot reviews, enable Bugbot for your team in the Cursor dashboard. |
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Collaborator
Author
|
@greptile |
Contributor
Greptile SummaryThis PR delivers a set of targeted security hardening and UX improvements across the mothership/inbox email pipeline and connector layer. The most significant changes are:
Confidence Score: 4/5
Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Raw HTML email body] --> B[replaceUntilStable\nstrip style tags]
B --> C[replaceUntilStable\nstrip script tags]
C --> D[Replace br/p/div/li\nwith newlines]
D --> E[replaceUntilStable\nstrip all remaining tags]
E --> F[decodeHtmlEntities\nsingle-pass map lookup]
F --> G[Collapse 3+ newlines\n& trim]
G --> H[Plain-text body]
I[Markdown response content] --> J[stripRawHtml\nreplaceUntilStable on non-code segments]
J --> K[marked.parse\nmarkdown → HTML]
K --> L[stripUnsafeUrls\nremove javascript:/vbscript: hrefs]
L --> M[Rendered email HTML]
style B fill:#fef3c7
style C fill:#fef3c7
style E fill:#fef3c7
style F fill:#d1fae5
style J fill:#fef3c7
Last reviewed commit: 0fdb2be |
…ations Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
TOOL_UI_METADATAas fallback for tool display titles sofast_editshows "Editing workflow" instead of "Fast Edit"replaceUntilStableto prevent nested tag injectionindexOffor email sender/display name parsingisHostedflag totrueType of Change
Testing
Tested manually
Checklist