mirror of
https://github.com/stablyai/orca.git
synced 2026-09-22 08:02:28 +00:00
* fix: address pr-bug-scan validated finding from #6315 Protect fenced/inline code spans from the HTML stripTags pass in normalizeMobileMarkdownPreviewHtml; blocks stripTags(next) at mobile-markdown-preview-html.ts:95 from deleting <...> inside code. * Preserve non-tag angle brackets in markdown preview HTML parser Only strip standard/known HTML tags instead of matching any `<...>` pattern. This prevents false-positive stripping of generic types (e.g., `Array<string>`) or math comparisons (e.g., `1 < 2`) in prose. Additionally, robustify markdown code block preservation by using a Private Use Area prefix (`\uE000`) and dynamically padding it to avoid collisions with literal input content. * Protect code spans when stripping HTML tags in mobile preview Ensure HTML-like content within code spans is not erroneously removed by the tag stripping logic. We now protect markdown code blocks and restore them after stripping tags and decoding HTML entities. --------- Co-authored-by: orca-bug-scan-bot <orca-bug-scan-bot@stably.ai> Co-authored-by: Jinjing <6427696+AmethystLiang@users.noreply.github.com>