Skip to content

Commit e29bcde

Browse files
committed
fix(automation): refine eGift eligibility check to avoid using innerHTML
1 parent c802199 commit e29bcde

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/automation/voting.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,9 @@ async function getCompanyList(webContents, sendLog) {
6565
6666
let hasEGift = false;
6767
if (cells.length > 4) {
68-
// innerText of 5th cell contains 'Y' if eGift is eligible
69-
hasEGift = cells[4].innerText.includes('Y') || cells[4].innerHTML.includes('Y');
68+
// innerText of 5th cell contains 'Y' if eGift is eligible.
69+
// Do NOT use innerHTML as it may contain hidden comments with 'Y'.
70+
hasEGift = cells[4].innerText.includes('Y');
7071
}
7172
7273
return {

0 commit comments

Comments
 (0)