Skip to content

The SVG image in the README is broken #1730

@rzzf

Description

@rzzf

Describe the bug

https://npmx.dev/package/element-plus#user-content-contributors

Possibly related:

// Only allow raster/vector image content types, but block SVG to prevent
// embedded JavaScript execution (SVGs can contain <script> tags, event handlers, etc.)
if (!contentType.startsWith('image/') || contentType.includes('svg')) {
await response.body?.cancel()
throw createError({
statusCode: 400,
message: 'URL does not point to an allowed image type.',
})
}

Additional context

No response

Logs

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions