ACF js filter `esc_html_dompurify_config` not working
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- javascript, php
- Domain
- frontend
Research direction
Reproduce the issue in the WordPress Editor with ACF 6.4.3, using a block or field with a group label and the esc_html_dompurify_config callbacks shown in the report. Inspect whether acf.add_filter or acf.addFilter registers the filter and verify completion when the callback is invoked and can affect the DOMPurify configuration.
Written by the indexing model from the issue text.
Description
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 👉👈
- Dominant language
- PHP
- Stars
- 947
- Forks
- 198
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from AdvancedCustomFields/acf
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
AdvancedCustomFields/acf#1056 ·
-
PHP 8.5: "Using null as an array offset" deprecation in ACF_Data::is() when rendering a block with empty data (local-meta.php is_request)Possibly taken @faisalahammad claimed this 30 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
AdvancedCustomFields/acf#1044 ·
-
is_preview was called incorrectly notice on every early get_field() since 6.8.10 (acf_revisions::acf_validate_post_id)Possibly taken @faisalahammad claimed this 30 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
AdvancedCustomFields/acf#1041 · 1 comment ·
-
True / False ACF control bug on RTL layoutsPossibly taken @elicohenator claimed this 53 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
AdvancedCustomFields/acf#1038 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
AdvancedCustomFields/acf#1034 · 3 comments ·
All issues in AdvancedCustomFields/acf
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 3 days
-
sync-en
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Maintainers usually reply within 1 day
-
[Sync EN] Formatting improvements to "Large Objects (LOBs)" docs (#6056)Possibly taken A pull request linked to this issue is open or already merged. Opensync-en
Difficulty 1/5 Under an hour Newbie friendliness 74/100
Maintainers usually reply within 1 day
-
Перевод устарел
Difficulty 2/5 1-3 hours Newbie friendliness 73/100
Maintainers usually reply within 1 day
-
repo:cms
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
craftcms/cms#20613 · 1 comment ·
Maintainers usually reply within 1 day