diff --git a/src/Admin/Native/PostListEnhance.php b/src/Admin/Native/PostListEnhance.php
index 9f3fc707..f0274c8f 100644
--- a/src/Admin/Native/PostListEnhance.php
+++ b/src/Admin/Native/PostListEnhance.php
@@ -347,12 +347,15 @@ class PostListEnhance {
return '';
}
- return $this->fields_html($fields, 'filter', __('高级筛选', 'aksrt'), __('让文章实现更加精细化的分类,同时方便用户进行文章筛选', 'aksrt'));
+ return $this->fields_html($fields, 'filter', __('高级筛选', 'aksrt'), '
' . esc_html__('让文章实现更加精细化的分类,同时方便用户进行文章筛选', 'aksrt') . '
');
}
/**
* Render one field group: the shared builder for every quick-edit box.
*
+ * $desc 是调用方预先转义好的 HTML 片段,这里原样输出(付费参数那组
+ * 自带 ,转义会把标签显示成文字)。
+ *
* @param array
> $fields
*/
private function fields_html(array $fields, string $id, string $title = '', string $desc = ''): string {
@@ -430,8 +433,9 @@ class PostListEnhance {
return '';
}
+ // $desc 由调用方传入并保证安全(均为代码内常量),故原样输出:
+ // 付费参数那组自带 ,转义会让标签直接显示成文字。
$legend = $title !== '' ? '
' : '';
- $desc = $desc !== '' ? '
' . esc_html($desc) . '
' : '';
return '
';
}
diff --git a/tests/widget-system/post-list-quick-edit-contract.test.cjs b/tests/widget-system/post-list-quick-edit-contract.test.cjs
index d2fd2545..b33d41f8 100644
--- a/tests/widget-system/post-list-quick-edit-contract.test.cjs
+++ b/tests/widget-system/post-list-quick-edit-contract.test.cjs
@@ -56,6 +56,17 @@ test('quick-edit markup is emitted without kses stripping the controls', () => {
assert.match(list, /