ACF js filter `esc_html_dompurify_config` not working
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 35/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- javascript, php
- 领域
- frontend
调研方向
在使用 ACF 6.4.3 的 WordPress Editor 中重现该问题,使用带有组标签的区块或字段,以及报告中所示的 esc_html_dompurify_config 回调。检查 acf.add_filter 或 acf.addFilter 是否注册了该过滤器,并在回调被调用且能够影响 DOMPurify 配置时验证是否完成。
由索引模型根据 Issue 内容生成。
描述
Describe the bug
Trying to use the new filter introduced in 6.4.3 esc_html_dompurify_config to not escape some html tags in the group label.
To Reproduce
Steps to reproduce the behavior:
- Go to Editor (with a block or field with group label)
- Monitor the console.
- No console for the filter.
Expected behavior
acf filter 'esc_html_dompurify_config' to function.
Code
Tried with:
import domReady from '@wordpress/dom-ready';
domReady(() => {
if (typeof acf !== 'undefined') {
acf.add_filter(
'esc_html_dompurify_config',
function (config) {
console.log('Sis');
return config;
}
);
}
});
and with:
acf.addFilter('esc_html_dompurify_config', function(config) {
console.log('Bro');
return config;
});
[!IMPORTANT]
The script is enqueued and other filters work.
Version Information:
- WordPress 6.8.2
- PHP Version 8.2
- ACF Version 6.4.3
- Browser doesn't matter
Any help will be apreciated 👉👈
- 主要语言
- PHP
- 星标
- 946
- 派生
- 197
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
AdvancedCustomFields/acf 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 78/100
AdvancedCustomFields/acf#1041 · 1 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 86/100
AdvancedCustomFields/acf#1038 ·
-
难度 2/5 1-3 小时 新手友好度 78/100
AdvancedCustomFields/acf#1034 · 2 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 86/100
AdvancedCustomFields/acf#1032 · 1 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 78/100
AdvancedCustomFields/acf#1029 · 1 条评论 ·
查看 AdvancedCustomFields/acf 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 68/100
-
Awaiting Triage
难度 1/5 1 小时以内 新手友好度 92/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
WordPress/two-factor#1008 ·
维护者通常 1 天内回复
-
sync-en
难度 2/5 1-3 小时 新手友好度 85/100
维护者通常 1 天内回复