fix: non-ascii character secret causes controller link error

https://github.com/clash-verge-rev/clash-verge-rev/issues/973#issuecomment-2094839700
This commit is contained in:
dongchengjie 2024-05-05 23:04:33 +08:00
parent 3271c96531
commit 04a4705dbd

View File

@ -65,7 +65,9 @@ export const ControllerViewer = forwardRef<DialogRef>((props, ref) => {
sx={{ width: 175 }}
value={secret}
placeholder={t("Recommended")}
onChange={(e) => setSecret(e.target.value)}
onChange={(e) =>
setSecret(e.target.value?.replace(/[^\x00-\x7F]/g, ""))
}
/>
</ListItem>
</List>