Skip to content

Background images don't load with special characters in URL #2216

Open
slidevjs/themes
#24
@FerroEduardo

Description

@FerroEduardo

Describe the bug

Background images don't load when URLs include special characters like ( and ), likely because the CSS url() function cannot properly parse unescaped characters.

? `linear-gradient(#0005, #0008), url(${resolveAssetUrl(background)})`
: `url("${resolveAssetUrl(background)}")`

Without parenthesis:
Image

With parenthesis:
Image

Minimal reproduction

---
theme: default
background: https://avatars.githubusercontent.com/u/47820549?id=(1234)
---

hello world

Environment

  • Slidev version: 52.0.0
  • Browser: Firefox 140.0.1
  • OS: Ubuntu 24.04.2 LTS

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions