You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Prevent crashes from malformed quoted font families
ios/htmlParser/HtmlParser.mm:1689
The updated attribute matcher accepts <span style="font-family: '">x</span>, leaving a one-character apostrophe here. It satisfies both quote checks below, so fontFamilyString.length - 2 underflows and substringWithRange: throws an exception. Malformed CSS can therefore crash iOS HTML parsing. Require at least two characters before removing surrounding quotes, and add a regression case.
Preserve layout whitespace through transparent wrappers
src/web/normalization/htmlNormalizer.ts:659
Inherited styling turns wrapped layout whitespace into an extra paragraph. For <span style="color:red"><p>A</p><span> </span><p><span style="color:blue">B</span></p></span>, the middle space gets a red wrapper because isLayoutWhitespace checks only its immediate parent. flushInlineP then sees markup rather than whitespace and emits three paragraphs instead of two. The same issue occurs in cpp/parser/GumboNormalizer.c:935–937. Preserve layout context through transparent wrappers without dropping meaningful inline spaces, and add this case to both test suites.
Resolve inherit styles before flattening
src/web/normalization/htmlNormalizer.ts:688
Flattening treats inherit as a concrete override. For <span style="color:red">A<span style="color:inherit">B</span></span>, it emits sibling red and inherit spans, so B no longer inherits red from its removed ancestor. The same merge in cpp/parser/GumboNormalizer.c:1002–1009 also loses that context. Resolve explicit inheritance against the parent style before flattening, and add this regression case to both normalizer test suites.
The reason will be displayed to describe this comment to others. Learn more.
previously the regex did not properly detect quoted font-family values, e.g. font-family: 'Times New Roman';
This branch has not been deployed
No deployments
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
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
Addressed the review comments on the base branch PR.
What was fixed:
fontSizeonallowFontScalingchanges, duringrebuildWithStylea staleallowFontScalingvalue was used<span>tags, e.g:& -> &For more context, visit #817
Compatibility
Checklist