Skip to content

fix(french/novelfrance): render inline italic tags instead of escaping them - #2834

Merged
rajarsheechatterjee merged 1 commit into
lnreader:masterfrom
Katsuexe:fix/novelfrance-italics
Nov 7, 2026
Merged

rajarsheechatterjee merged 1 commit into
lnreader:masterfrom
Katsuexe:fix/novelfrance-italics

Conversation

@Katsuexe

@Katsuexe Katsuexe commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

Problem

In NovelFrance 1.0.1, chapters show literal <i>…</i> tags in the reader instead of
italic text.

Repro: open "The Broken Halo", chapter 1 -> thoughts are displayed with visible
<i> / </i>.

Cause

parseChapter runs every paragraph from the API (paragraphs[].content) through
escapeHtml. The API already sends inline markup (<i>…</i>), so escapeHtml turns it into
&lt;i&gt;…&lt;/i&gt;.

Fix

  • After escaping, escapeHtml restores only attribute-less inline tags: i, em, b,
    strong, u.
  • Everything else stays escaped (<script>, &, tags with attributes, ...), so no new HTML
    injection surface.
  • Plugin version bumped 1.0.1 -> 1.0.2.

Testing

  • npm run check:plugin -- plugins/french/novelfrance.ts:
    Check Result Details
    popularNovels ✅ PASS 24 novels
    searchNovels ✅ PASS 1 results for "Reverend Insanity"
    parseNovel ✅ PASS 2334 chapters
    parseChapter ✅ PASS 13646 chars
  • Real chapter test (the-broken-halo/chapter-1): italic tags (<i>…</i>) are preserved as HTML markup instead of raw &lt;i&gt; text.
  • escapeHtml checked in isolation: <i>x</i> kept, <script> escaped, & -> &amp;, <i onclick="…"> stays escaped.
  • npx prettier --check plugins/french/novelfrance.ts, npx eslint plugins/french/novelfrance.ts, npm run build:compile: OK.

AI disclosure

The patch was drafted with help from Claude (AI assistant) and reviewed/tested by me.

…g them

Co-Authored-By: Claude <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings November 7, 2026 00:34

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@greptile-apps

greptile-apps Bot commented Nov 7, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Low impact] The PR appears safe to merge.

Summary

NovelFrance now renders attribute-less inline formatting tags instead of showing them as text.

  • NovelFrance chapters render supported inline formatting.

Reviews (1) · Last reviewed commit: "fix(french/novelfrance): render inline i..." · Reviewed by Greptile

@rajarsheechatterjee
rajarsheechatterjee merged commit a38db6d into lnreader:master Nov 7, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants