From 1a0c39693e69cfcf937d7d70bb49c93523ae2b3c Mon Sep 17 00:00:00 2001 From: Alireza Ahmadi Date: Tue, 3 Feb 2026 20:54:42 +0100 Subject: [PATCH] fix: trim whitespace Co-authored-by: MHSanaei --- web/html/xui/xray_rule_modal.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/web/html/xui/xray_rule_modal.html b/web/html/xui/xray_rule_modal.html index 2dc5d553..e65d20a4 100644 --- a/web/html/xui/xray_rule_modal.html +++ b/web/html/xui/xray_rule_modal.html @@ -220,13 +220,13 @@ newRule = {}; rule.type = "field"; rule.domainMatcher = value.domainMatcher; - rule.domain = value.domain.length>0 ? value.domain.split(',') : []; - rule.ip = value.ip.length>0 ? value.ip.split(',') : []; + rule.domain = value.domain.length>0 ? value.domain.split(',').map(s => s.trim()) : []; + rule.ip = value.ip.length>0 ? value.ip.split(',').map(s => s.trim()) : []; rule.port = value.port; rule.sourcePort = value.sourcePort; rule.network = value.network; - rule.source = value.source.length>0 ? value.source.split(',') : []; - rule.user = value.user.length>0 ? value.user.split(',') : []; + rule.source = value.source.length>0 ? value.source.split(',').map(s => s.trim()) : []; + rule.user = value.user.length>0 ? value.user.split(',').map(s => s.trim()) : []; rule.inboundTag = value.inboundTag; rule.protocol = value.protocol; rule.attrs = Object.fromEntries(value.attrs);