From fce5ab30881aef6b12032e35f9a5e0b0e714a3ab Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 21 Jul 2026 20:19:11 +0800 Subject: [PATCH] fix(vip): preserve equity HTML instead of re-splitting into list items --- .../css/frontend/nav/header-menu-buttons.css | 8 ++ assets/css/routes/user-center/credits.css | 11 ++- inc/helpers/aksrt-vip.php | 77 +++++++++++++++++++ inc/helpers/user-center-renderers/vip-tab.php | 77 +------------------ src/AKSRT/Content/VipServiceModal.php | 39 +++------- 5 files changed, 110 insertions(+), 102 deletions(-) diff --git a/assets/css/frontend/nav/header-menu-buttons.css b/assets/css/frontend/nav/header-menu-buttons.css index 0b6e1727..4f68f8db 100644 --- a/assets/css/frontend/nav/header-menu-buttons.css +++ b/assets/css/frontend/nav/header-menu-buttons.css @@ -288,6 +288,14 @@ opacity: 0.5; } +/* Non-list equity HTML in hover cards */ +.sub-vip-card .v-equity > p { + margin: 0 0 6px; +} +.sub-vip-card .v-equity > p:last-child { + margin-bottom: 0; +} + .sub-vip-card .payvip-button { font-size: 1em !important; margin: 0 !important; diff --git a/assets/css/routes/user-center/credits.css b/assets/css/routes/user-center/credits.css index 50a7f3a6..68d46aa7 100644 --- a/assets/css/routes/user-center/credits.css +++ b/assets/css/routes/user-center/credits.css @@ -1233,7 +1233,7 @@ body.uc-modal-open { margin-top: 2px; } -/* CRITICAL: equity must stack as list, never one jammed line */ +/* CRITICAL: equity is admin HTML; keep author structure, only force vertical flow for li */ .uc-vip-tab .uc-vip-level-card .v-equity, .uc-vip-tab .pay-vip-info .v-equity { display: block !important; @@ -1276,6 +1276,15 @@ body.uc-modal-open { background: currentColor; opacity: 0.45; } +/* Non-list equity HTML (p/br/div) */ +.uc-vip-tab .uc-vip-level-card .v-equity > p, +.uc-vip-tab .pay-vip-info .v-equity > p { + margin: 0 0 8px; +} +.uc-vip-tab .uc-vip-level-card .v-equity > p:last-child, +.uc-vip-tab .pay-vip-info .v-equity > p:last-child { + margin-bottom: 0; +} .uc-vip-cta { display: inline-flex !important; diff --git a/inc/helpers/aksrt-vip.php b/inc/helpers/aksrt-vip.php index e1987214..e2bcec03 100644 --- a/inc/helpers/aksrt-vip.php +++ b/inc/helpers/aksrt-vip.php @@ -415,3 +415,80 @@ if (!function_exists('aksrt_get_vip_purchase_url')) { return home_url('/'); } } + +/** + * Format VIP equity HTML for front-end display. + * + * Admin field is free-form HTML (typically one or more
  • ). Do NOT + * re-parse / re-split the content into synthetic list items by punctuation + * or Chinese keyword heuristics — that mangles intentional HTML. + * + * Rules: + * - Sanitize with a small allowlist. + * - If markup already has
  • , wrap the items in