fix(vip): render points exchange description
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
0d51beeaad
commit
a120f61e13
7 files changed
+112
-4
No files matched your search
@@ -224,7 +224,8 @@ test('积分兑换说明按 post 级 HTML 放行并原样渲染', () => {
|
||||
assert.match(schemaPhp, /'key' => 'pay_vip_points_exchange_desc', 'label' => '兑换说明', 'type' => 'textarea', 'sanitize_type' => 'html'/);
|
||||
const vipSettings = slice(paymentRuntime, 'public static function get_payment_vip_settings', 'public static function get_payment_revenue_settings');
|
||||
assert.match(vipSettings, /'desc'\s+=> wp_kses_post\(\(string\) \(\$settings\['pay_vip_points_exchange_desc'\]/);
|
||||
// 弹窗渲染端不再 esc_html 剥标签。
|
||||
assert.match(modalSource, /<div class="muted-box muted-2-color padding-10 em09 mt20">' \. wp_kses_post\(\$desc_text\)/);
|
||||
// 弹窗从同一份 VIP 设置上下文读取说明,不经 catalog 投影遗漏;说明容器保留参考主题的 HTML 与定位类。
|
||||
assert.match(modalSource, /\$desc_text = trim\(\(string\) \(\$vip\['points_exchange'\]\['desc'\] \?\? ''\)\);/);
|
||||
assert.match(modalSource, /<div class="muted-box muted-2-color padding-10 em09 mt20 aksrt-vip-points-desc">' \. wp_kses_post\(\$desc_text\)/);
|
||||
assert.doesNotMatch(modalSource, /esc_html\(\$desc_text\)/);
|
||||
});
|
||||
Reference in new issue
Block a user