Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
/S2Public

🙏 Change SVG icon loading format #3125

Open
Labels
@corocoto

Description

@corocoto

Describe the feature / 功能描述

Hello,

I would like to propose a change in the way SVG icons are loaded in the S2 library. Currently, SVG icons are embedded using thedata:image format. While this approach is convenient, it poses a challenge for applications that have a strict Content Security Policy (CSP) in place, specifically when theimage-src 'self' directive is used.

Thedata:image format is not compatible with theimage-src 'self' directive, leading to issues where SVG icons fail to load unless the CSP is relaxed. However, weakening the CSP configuration is not a desirable solution due to security concerns.

Image

Image

To address this, I suggest modifying the process of loading SVG icons in a way that is compatible with strict CSP settings.

Implementing this change would enhance the library's compatibility with secure web applications and allow developers to maintain robust CSP configurations without compromising on functionality.

Design the API / API 设计

nametypedefaultdescription
----

Are you willing to contribute? / 是否愿意参与贡献?

Please select / 请选择

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp