Folo icon indicating copy to clipboard operation
Folo copied to clipboard

Failed to render codeblocks in the form of <figure data-sanitized-class="highlight python">.

Open buptsad opened this issue 1 year ago • 3 comments

Describe the bug

I'm trying to make a RSS feed from another person's blog through freshRSS. It works really fine on freshRSS, but the codeblocks disappeared on Follow. The codeblocks in the blog is written in the form <figure data-sanitized-class="highlight python">, but not <pre><code> form. Other things seems fine in follow.

Feed Info

One article in the blog with codeblocks is here: https://tangcuxiaojikuai.xyz/post/21418325.html

Reproduction Video

No response

App Type

Electron / App

Version

latest

Operating System

Windows 11

Browser Info

No response

Validations

  • [X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • [X] Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.

Contributions

  • [ ] I am willing to submit a PR to fix this issue
  • [ ] I am willing to submit a PR with failing tests (actually just go ahead and do it, thanks!)

buptsad avatar Oct 10 '24 02:10 buptsad

Please provide feed information, I can't find the RSS link on your website.

hyoban avatar Oct 10 '24 03:10 hyoban

Please provide feed information, I can't find the RSS link on your website.

The feed is made by FreshRSS as there is no RSS feed for the website. I can paste my opml below which can be import into freshRSS and use link to access.

<?xml version="1.0" encoding="UTF-8"?>
<opml xmlns:frss="https://freshrss.org/opml" version="2.0">
  <head>
    <title>FreshRSS</title>
    <dateCreated>Thu, 10 Oct 2024 03:21:41 +0200</dateCreated>
  </head>
  <body>
    <outline text="糖醋小鸡块的blog" type="HTML+XPath" xmlUrl="https://tangcuxiaojikuai.xyz/" htmlUrl="https://tangcuxiaojikuai.xyz/" description="糖醋小鸡块的blog 的订阅源" frss:xPathItem="//article[@class=&quot;post-block&quot;]" frss:xPathItemTitle="descendant::h2[@class=&quot;post-title&quot;]/a/text()" frss:xPathItemContent="descendant::div[@class=&quot;post-body&quot;]" frss:xPathItemUri="descendant::h2[@class=&quot;post-title&quot;]/a/@href" frss:xPathItemAuthor="descendant::span[@itemprop=&quot;author&quot;]/meta[@itemprop=&quot;name&quot;]/@content" frss:xPathItemTimestamp="descendant::time[@itemprop=&quot;dateCreated datePublished&quot;]/@datetime" frss:xPathItemCategories="descendant::span[@itemprop=&quot;about&quot;]/a/span/text()" frss:xPathItemUid="descendant::h2[@class=&quot;post-title&quot;]/a/@href" frss:cssFullContent="body" frss:cssFullContentFilter=".header, .sidebar, .post-meta-item, .back-to-top" frss:CURLOPT_USERAGENT="Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:86.0)"/>
  </body>
</opml>

buptsad avatar Oct 10 '24 03:10 buptsad

figure html tag is filtered by rehype-sanitize default schema.

@hyoban You'll need to add exclusions to both web and server, and then test to see if it renders correctly.

Innei avatar Oct 11 '24 15:10 Innei