fix: #329 text ellipsis. Sonar

This commit is contained in:
Cindy Chang
2024-08-14 09:59:09 +08:00
parent 2a188c34ec
commit df341c26ab
3 changed files with 7 additions and 6 deletions

View File

@@ -247,7 +247,7 @@ export default {
// 避免直接使用動態 href改用安全的方法來處理動態導航避免直接將未經驗證的數據綁定到 href 屬性。
isSafeTagId(tagId) {
// 檢查 tagId 是否符合安全的格式(例如只允許特定的模式或路徑)
const pattern = /^#?[a-zA-Z0-9-_\/]*$/; // 例如: #waitingTime
const pattern = /^#?[a-zA-Z0-9-]*$/; // 例如: #waitingTime
return pattern.test(tagId);
},
/**