fix: encode post cover image URLs to prevent loading issue (#7533)

#### What type of PR is this?

/area ui
/kind bug
/milestone 2.21.x

#### What this PR does / why we need it:

Encode post cover image URLs to prevent loading issue

<img width="736" alt="image" src="https://github.com/user-attachments/assets/0f298c64-37b3-4692-bdfa-922fd0e37dd9" />

#### Does this PR introduce a user-facing change?

```release-note
None
```
pull/7535/head
Ryan Wang 2025-06-10 23:14:36 +08:00 committed by GitHub
parent 86d5cd24e1
commit 6f769b0c59
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -1,5 +1,5 @@
export function generateThumbnailUrl(url: string, size: string) {
return `/apis/api.storage.halo.run/v1alpha1/thumbnails/-/via-uri?uri=${encodeURI(
return `/apis/api.storage.halo.run/v1alpha1/thumbnails/-/via-uri?uri=${encodeURIComponent(
url
)}&size=${size}`;
}