Skip to content

[Bug] Multiline code blocks styled with ugly per-line background in Origine theme #7796

@Fraetor

Description

@Fraetor

Describe the bug

Multiline code blocks (<pre> containing <code>) styled with ugly per-line background in the Origine theme.

For example, the following HTML

<pre><code>$ echo "{" | base64
ewo=
$ echo "{\"" | base64
eyIK
$ echo "{\"s" | base64
eyJzCg==
$ echo "{\"a" | base64
eyJhCg==
$ echo "{\"word\"" | base64
eyJ3b3JkIgo=
</code></pre>

is rendered as

Image

To Reproduce

  1. Load a feed containing a multi-line block of code, such as this one: https://planet.gnome.org//rss20.xml
  2. Find an article with a block of code within that feed, such as TIL that You can spot base64 encoded JSON, certificates, and private keys
  3. Observe each line of code in the code block has a background, rather than displaying consistently.

Expected behavior

<code> inside a <pre> should not be styled specially (if we don't have highlighting support). This can likely be achieved with a CSS :has selector or a separate blank style for pre>code.

FreshRSS version

1.26.3

System information

  • Database version: SQLite
  • Installation type: podman (docker.io/freshrss/freshrss:latest)
  • Web server type: nginx
  • OS: Fedora 42
  • Browser: Firefox 141

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions