fix(confluence): drop scripts, styles, and unresolved Jira placeholders from indexed page text - #7831
Merged
Merged
Conversation
…rs from indexed page text
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
|
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
<script>/<style>before text extraction. App macros (draw.io, table filter, Markdown) emit a Connect bootstrap script and colored text / table of contents / roadmap emit inline CSS, which were being indexed as page textviewbody only carries the browser placeholder (KEY - Getting issue details... STATUS, localized), detected by theissue-placeholderclass; macros Confluence resolved keep their summary and statusplaceholdershells (header row, loading spinner, refresh settings) are dropped; tables with real rows are untouchedconfluenceViewToPlainText) instead of re-serializing and stripping twicespaceKey/contentTypewithundefined, andgetDocumentreportspagevsblogpostfrom the endpoint that answeredview-callouts→view-text-v2) so existing non-scoped Confluence documents rehydrate once with the cleaned text; a page whose only content is an app macro now skips as having no extractable text instead of indexing its bootstrap JSType of Change
Testing
body-format=viewbodies from 502 public pages across 18 sites and diffed old vs new output: callout labels identical on every page; every removed segment is CSS, Connect bootstrap JS, Jira issue placeholder text, or a Jira table placeholder shell; no text added and every Jira key preservedexport_viewreturns no Jira summary/status either, so reading a different body format would not recover morecheck:audits, docs manifest checkChecklist