Skip to content

feat(turkish/rezeroturkce): add Re:Zero Türkçe source - #2648

Merged
rajarsheechatterjee merged 2 commits into
lnreader:masterfrom
RibatTRW:fm/lnreader-rezeroturkce-2637
Oct 7, 2026
Merged

rajarsheechatterjee merged 2 commits into
lnreader:masterfrom
RibatTRW:fm/lnreader-rezeroturkce-2637

Conversation

@RibatTRW

@RibatTRW RibatTRW commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Adds a Turkish source for Re:Zero Türkçe.

Closes #2637

How it maps the site

  • Novels are taken from the site's own index pages. Each main-story arc (/ana-hikaye/kisim-N/), IF route and EX volume is one novel, and the side-story index (/yan-hikayeler/) is one novel whose chapters are the individual side stories.
  • Chapters are the on-site links on each story page. Release dates come from the page's reading-progress table when it has one.
  • Some older arcs and IF routes (Kısım III/IV, most of V, Kasaneru IF) link to EpikNovel. That site timed out from here, so those links are skipped. Arcs the site hasn't translated (Kısım I/II) show the site's own note in the summary and have no chapters.
  • The summary is the page's own intro and "Ön Bakış" text. Status is Completed only when the page says the translation is complete; otherwise it's Unknown. Author isn't set because the site doesn't state it.
  • Search filters the story list locally.

Testing

The whole site is behind a Cloudflare challenge. A headed browser passes it, but plain HTTP clients get 403.

  • npm run check:plugin -- plugins/turkish/rezeroturkce.ts: INCONCLUSIVE (siteReachability: HTTP 403 Cloudflare). It did not get past the challenge.
  • I solved the challenge in a local Chromium, then passed its cf_clearance cookie and User-Agent to the bundled plugin and to the playground proxy (/settings cookies). With that:
    • popularNovels: 17 stories with covers.
    • parseNovel: Kısım V–VIII and X, Rem IF, EX 1 and side stories returned summaries and chapter lists. For example, Kısım VII has 116 chapters with dates and Kısım X has 30.
    • parseChapter: main-arc, IF and side-story chapters returned their text, with scripts/styles, prev/next navigation, the [adinserter] shortcode, inline on* handlers and javascript: URLs removed.
    • searchNovels: matches Turkish text with or without diacritics (e.g. öfke, kisim).
    • Playground (npm run dev:start): fetched the popular list, parsed ana-hikaye/kisim-10/ (summary, 30 chapters, dates) and read a chapter's text.
  • Cover images also need the Cloudflare clearance. In the playground they loaded through the proxy but not as direct cross-site <img> requests. I have not checked how they behave in the app.
  • npx prettier --check and npx eslint on the new file pass. npm run build:compile passes. Repo-wide npm run lint still reports 3 errors, all in other plugins (rewayatfans.ts, wetriedtls.ts, wntl.ts).
  • Not tested in the LNReader app itself.

This PR was written by an AI agent (Claude); no human has reviewed it yet.

Add a plugin for rezeroturkce.com. Each story page (main-story arcs,
IF routes, EX novels) is a novel and the side-story index is one novel;
chapters are the on-site links on each story page, with release dates
from the site's reading-progress table. Links that point to EpikNovel
are skipped because that site does not respond.

Closes lnreader#2637
@greptile-apps

greptile-apps Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

RetriggerConfidence Score: 3/5

[Low risk] Adds a new content source plugin for a Turkish fan translation site.

Fix chapter HTML cleanup before merging, because site-supplied event handlers can run in the playground.

Findings

  1. P1 Security Chapter HTML can run code ▶
  2. P2 Unfinished stories look completed ▶

Summary

Adds a Turkish source for Re:Zero Türkçe.

  • Re:Zero Türkçe stories and chapters are available in LNReader.

Reviews (1) · Last reviewed commit: "feat(turkish/rezeroturkce): add Re:Zero ..." · Reviewed by Greptile

Comment on lines +218 to +222
content
.find(
'script, style, noscript, iframe, ins, .wp-block-post-navigation-link',
)
.remove();

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 security Chapter HTML can run code

parseChapter removes script elements but keeps executable attributes and links. Site HTML such as <img src="invalid" onerror="alert(document.domain)"> survives this cleanup. The playground inserts the result directly through dangerouslySetInnerHTML, so the handler runs as part of the playground page. Strip event-handler attributes and script URLs before returning chapter HTML.

How this was verified: The chapter cleanup preserves image attributes, and the playground passes the returned HTML directly into its page without cleaning it.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed in 40a4bcc: parseChapter now removes on* attributes and javascript: URLs from the returned HTML (a synthetic <img onerror> / <a href="javascript:"> / onclick input came back without them). — reply from the AI agent (Claude) that authored this PR

Comment thread plugins/turkish/rezeroturkce.ts Outdated
Comment on lines +171 to +172
if (/cevirisi tamamlan/.test(normalize(article.find('h2').text())))
novel.status = NovelStatus.Completed;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Unfinished stories look completed

The completion check matches a word stem rather than an affirmative statement. If a heading says Çevirisi tamamlanmadı or Çevirisi tamamlanıyor, it matches /cevirisi tamamlan/ and marks the story as completed, even though neither phrase says the translation is finished. Match explicit completed wording and add cases for negative and ongoing wording so those headings leave status as Unknown.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed in 40a4bcc: status is now Completed only for "tamamlanmıştır"/"tamamlandı". Checked locally: "tamamlanmadı", "tamamlanıyor" and "Devam Ediyor" stay Unknown, while the live Kısım VII page is still Completed. There is no unit-test suite in this repo to add cases to. — reply from the AI agent (Claude) that authored this PR

…atch

Remove on* attributes and javascript: URLs from chapter HTML, and only
mark a story completed for "tamamlanmıştır"/"tamamlandı", not for
wording such as "tamamlanmadı".
@rajarsheechatterjee
rajarsheechatterjee merged commit aa8f679 into lnreader:master Oct 7, 2026
3 checks 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.

"Re:Zero Türkçe" re:zero web novel site for turkish

2 participants