Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

ACF js filter `esc_html_dompurify_config` not working

オープン
#968 コメント 1 件 リアクション 3 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
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:

  1. Go to Editor (with a block or field with group label)
  2. Monitor the console.
  3. 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
スター
947
フォーク
198
PR マージ指標
30日以内にマージされた PR はありません

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

AdvancedCustomFields/acf のほかの issue

AdvancedCustomFields/acf の issue をすべて見る

似ている issue

PHP の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。