Version bump to 9.49.0#3316
Merged
flyingbee2012 merged 48 commits intomicrosoft:releasefrom Mar 27, 2026
Merged
Conversation
* fix publish file * remove file
…soft#3265) Add undoSnapshot after pressing Tab key in a table that has new content, otherwise if the user type content in a table and press tab to move to another cell and then undo the content, all the typed content will be removed.
…ft#3270) When press backspace or shift + delete when an entire row or column, delete the column and row.
Add new shift cells up and shift cells left table operations. These operations move the table cell content to the cells at left or above.
When apply alignment in table cells that has list items, also apply the alignment to the list items.
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.21 to 4.17.23. - [Release notes](https://github.com/lodash/lodash/releases) - [Commits](lodash/lodash@4.17.21...4.17.23) --- updated-dependencies: - dependency-name: lodash dependency-version: 4.17.23 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Jiuqing Song <jisong@microsoft.com>
When triggering clearFormat on table cells, do not clear the cell or the table format.
…3274) When start shadow edit, check if table cells are selected, if they are selected, remove the background color to make the styles changes visible in the table.
Fix JSDoc comments for removeTableCellsStyle function to match actual parameters Fix JSDoc comments for setTableCellsStyle function to match actual parameters
Co-authored-by: Bryan Valverde U <bvalverde@microsoft.com>
When inserting a table in a range selection, insert the selected content inside the table.
Bumps [webpack](https://github.com/webpack/webpack) from 5.94.0 to 5.104.1. - [Release notes](https://github.com/webpack/webpack/releases) - [Changelog](https://github.com/webpack/webpack/blob/main/CHANGELOG.md) - [Commits](webpack/webpack@v5.94.0...v5.104.1) --- updated-dependencies: - dependency-name: webpack dependency-version: 5.104.1 dependency-type: direct:development ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…rn support (microsoft#3283) * Filter temporary EOP elements in Word Online paste and add test pattern support - Skip elements with both 'Selected' and 'EOP' classes during WAC paste processing to remove temporary End of Paragraph markers - Add unit tests for EOP element filtering behavior (3 test cases) - Enhance test runner with --testPathPattern and --testNamePattern flags for faster targeted test execution 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * Update packages/roosterjs-content-model-plugins/lib/paste/WacComponents/processPastedContentWacComponents.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Dark color improvement * improve
…oft#3281) When merging table cells, count table that are span as one cell, so two or more cells cannot be merge to one single span cell.
When pressing key up or key down in table cells that have text, preserve the cursor position.
… pasting from Word Desktop (microsoft#3288) Word Desktop pastes list items with full indentation as marginLeft on MsoListParagraph elements, which duplicates the paddingInlineStart (40px) already applied by the browser's default list styling. This parser subtracts the default 40px from the marginLeft of list items with the MsoListParagraph class to correct the indentation. - Add adjustWordListMarginParser using parseValueWithUnit for unit conversion - Register parser for listItemElement in processPastedContentFromWordDesktop - Update addParser call count expectations in pasteTest and ContentModelPastePluginTest - Add dedicated test case for the margin adjustment behavior
Co-authored-by: Bryan Valverde U <bvalverde@microsoft.com>
…sp (microsoft#3235) (microsoft#3287) * Preserve trailing space in last paragraph segment by converting to nbsp When the last text segment in a paragraph ends with a regular space, browsers collapse it during rendering. This change detects that case in handleText and replaces the trailing space with a non-breaking space (\u00A0) so it is preserved in the output. To support this, a new ModelToDomSegmentContext interface is introduced that extends ModelToDomContext with an isLastSegment flag. handleParagraph sets this flag for each segment before dispatching, and ContentModelSegmentHandler is updated to use ModelToDomSegmentContext as its context type, eliminating the need for type casts in the handlers. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * Apply suggestions from code review Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Improve trailing space to nbsp conversion with noFollowingTextSegmentOrLast Refactor handleParagraph to track whether a text segment is the last in the paragraph or has no following text segment (excluding SelectionMarkers). This ensures trailing spaces are converted to not only for the very last segment, but also when the next non-marker segment is not a Text segment. - Convert forEach to for loop in handleParagraph for segment iteration - Extract hasTextSegmentAfter helper to check for upcoming text segments - Add noFollowingTextSegmentOrLast property to ModelToDomSegmentContext - Update handleText to use the new property name - Fix stale isLastSegment references in handleTextTest - Add comprehensive tests for noFollowingTextSegmentOrLast in handleParagraphTest --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Bumps [minimatch](https://github.com/isaacs/minimatch) from 3.1.2 to 3.1.5. - [Changelog](https://github.com/isaacs/minimatch/blob/main/changelog.md) - [Commits](isaacs/minimatch@v3.1.2...v3.1.5) --- updated-dependencies: - dependency-name: minimatch dependency-version: 3.1.5 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
microsoft#3293) * merge model * new table styles * fixes * add test * nit * nit
Strip invisible Unicode characters (zero-width chars, bidirectional marks, Unicode Tags U+E0001-E007F, etc.) from link href attributes at multiple layers to prevent hidden content injection via mailto: links. Changes: - Add stripInvisibleUnicode utility in roosterjs-content-model-dom - Apply stripping in sanitizeElement.ts (HTML paste/sanitization path) - Apply stripping in checkXss.ts (programmatic link insertion path) - Apply stripping in linkFormatHandler.ts (DOM-to-model conversion path) - Apply stripping in linkProcessor.ts (DOM-to-model conditional check) - Add comprehensive unit tests for all changes Bug: https://outlookweb.visualstudio.com/Outlook%20Web/_workitems/edit/409639 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…t/linkFormatHandler.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…, use strict equality - Strip invisible Unicode from href BEFORE the script: regex check to prevent XSS bypass (e.g., s\u200Bcript: passing the check then being stripped to script:) - Guard against empty href after stripping in linkFormatHandler (only set format.href when sanitizedHref is non-empty) - Use strict equality (===) for attribute name checks Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
… comments Extend the stripped character set to include Mongolian free variation selectors (U+180B-180D), interlinear annotation anchors (U+FFF9-FFFB), and extended Unicode Tags (U+E0080-E00FF). Add defense-in-depth comments at each call site, document ZWJ/emoji and URL-encoding limitations, and add 4 new tests for the expanded character ranges. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add decodeURIComponent before stripping so that URL-encoded invisible characters (e.g. %E2%80%8B for U+200B) are also caught. Falls back gracefully on malformed percent-encoding. Adds 5 new tests for URL-encoded scenarios. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Bumps [immutable](https://github.com/immutable-js/immutable-js) from 4.0.0 to 4.3.8. - [Release notes](https://github.com/immutable-js/immutable-js/releases) - [Changelog](https://github.com/immutable-js/immutable-js/blob/main/CHANGELOG.md) - [Commits](immutable-js/immutable-js@v4.0.0...v4.3.8) --- updated-dependencies: - dependency-name: immutable dependency-version: 4.3.8 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
When pasting table cells that are merged, counts only the logical cells and not all physical cells, otherwise, the number of pasted cells will appear bigger than then the actually copied
…s editing (microsoft#3301) * Feature: support cid: image sources via resolveImageSource for reliable canvas editing * Fix format --------- Co-authored-by: Liang Meng <liangmeng@microsoft.com> Co-authored-by: Jiuqing Song <jisong@microsoft.com>
* Fix microsoft#3292 * Update packages/roosterjs-content-model-types/lib/contentModel/format/ContentModelFormatMap.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…hot path Remove stripInvisibleUnicode from linkProcessor, linkFormatHandler, and sanitizeElement (all hot paths that run on every DOM-to-model conversion). Instead, sanitize the entire initial model once in the Editor constructor via new sanitizeInvisibleUnicode() utility. This walks all text segments, link hrefs, and Text nodes inside General segment elements. The checkXss path still covers insertLink at runtime. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…for better paste interop with Wac Components (microsoft#3304) * Keep Margins in the List items, and set the padding of list elements for better paste interop with Word Components * Remove obsolete test
Per PR review feedback, do not decode percent-encoded sequences as the content may be intentional user input. Only strip raw invisible Unicode characters. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* merge model * move table cursor
…le-unicode Strip invisible Unicode from content model at editor initialization as defence in depth for any security risks coming in from mailTo links or otherwise.
Bumps [flatted](https://github.com/WebReflection/flatted) from 3.2.5 to 3.4.2. - [Commits](WebReflection/flatted@v3.2.5...v3.4.2) --- updated-dependencies: - dependency-name: flatted dependency-version: 3.4.2 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…nmeaningful paragraphs (microsoft#3306) When a selection spans multiple paragraphs and the cursor lands on an unmeaningful paragraph (one that contains only a trailing/leading SelectionMarker), the previous call to getSelectedParagraphs with removeUnmeaningful=true would skip those paragraphs. This caused getFormatState to see a mix of paragraphs — some with marginTop/marginBottom set and some without — which triggered the conflict-resolution logic and returned undefined for those margin values, breaking the "space before/after" toolbar buttons. Fix: pass removeUnmeaningful=false in formatParagraphWithContentModel so that all selected paragraphs (including unmeaningful ones at the edges) receive the same format, keeping margins consistent across the selection. Also fix the isChecked logic in spaceBeforeAfterButtons so the button highlights correctly when a positive margin is present, and add overload + implementation guard for the new removeUnmeaningful parameter in getSelectedParagraphs. Add unit tests for the new removeUnmeaningful=false and mutate=true paths in collectSelections, and for formatParagraphWithContentModel covering multiple paragraphs, list items, table cells, no-selection return value, and apiName threading. Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
When pasting a table that has border color set to "initial", use black as default color. Otherwise, the table border color handler will treat the table as it has no border color.
JiuqingSong
approved these changes
Mar 27, 2026
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.
Version bump to 9.49.0