Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

[6.x]: Element editor sidebar Nodes can't include links, buttons or inline SVG

Đã đóng
#19,909 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
22/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
php
Lĩnh vực
backend

Hướng nghiên cứu

Start from the metaFieldsNodes() method on element types and follow how its returned nodes reach the element editor sidebar, including the TemplateContent node that the issue says is sanitized and rendered inert. The open question is whether sidebar nodes should allow links, buttons and inline SVG, which is a sanitization and security decision the maintainers need to make before any code changes. Done would mean an agreed rule for what sidebar content is allowed, plus a test showing a permitted element survives rendering.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

bug repo:cms
What happened?

Element types add sidebar content via metaFieldsNodes(). For read-only rich content the only option is TemplateContent, which is sanitized (inline SVG, buttons and inputs are dropped) and rendered inert, so even links can't be clicked.

My case: a custom Element sidebar would like to show a supporting URL, inline SVG, and a "Download SVG" button. Today, as a workaround, I render the URL as plain text, the inline SVG as an , and moved the download to the action menu.

Previously, I believe we used to be able to render any HTML as additional content in the sidebar. It would be nice to have more flexibility in the sidebar nodes again.

Craft CMS version

6.0.0-alpha.20

PHP version

No response

Operating system and version

No response

Database type and version

No response

Image driver and version

No response

Installed plugins and versions
Ngôn ngữ chính
PHP
Star
3.6k
Fork
706
Merge trung bình
12 giờ 30 phút
Pull request đã merge (30 ngày)
274

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của craftcms/cms

Tất cả issue của craftcms/cms

Issue tương tự

Thêm issue về PHP

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.