fix(vip): let 积分兑换说明 support HTML like the reference theme
The points-exchange desc was stripped at all three layers: no sanitize_type on the schema fields (save ran sanitize_textarea_field), the runtime re-ran the same strip, and the points modal escaped it with esc_html. The reference theme declares sanitize=false and concatenates the value raw into the modal. - Schema (SPA + PHP): sanitize_type html, rows 2, help text noting HTML support - PaymentRuntime: output via wp_kses_post - VipServiceModal points modal: render via wp_kses_post instead of esc_html Verification: new contract test covers schema/runtime/modal layers; node --test tests/**/*.test.cjs 641/641 pass; php -l clean on both PHP files.
This commit is contained in:
1 parent
2e2558e5ce
commit
dcb80cff6e
5 files changed
+18
-4
No files matched your search
@@ -238,7 +238,9 @@ trait VipServiceModal {
|
||||
|
||||
$desc_text = trim((string) ($points_ex['desc'] ?? ''));
|
||||
$desc = $desc_text !== ''
|
||||
? '<div class="muted-box muted-2-color padding-10 em09 mt20">' . esc_html($desc_text) . '</div>'
|
||||
// 管理员编辑的富文本说明:保存端已 wp_kses_post,这里同级别输出
|
||||
// (参考主题 zibpay_get_vip_points_exchange_modal 原样拼接)。
|
||||
? '<div class="muted-box muted-2-color padding-10 em09 mt20">' . wp_kses_post($desc_text) . '</div>'
|
||||
: '';
|
||||
|
||||
// 最低价套餐仍超出用户积分 → 参考主题的 badg c-red btn-block 提示。
|
||||
|
||||
Reference in new issue
Block a user