-
-
Notifications
You must be signed in to change notification settings - Fork 335
WIP: Testplan multi-clone #4001
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
seems a bit more appropriate
make the button more square-ish which looks better with the rest of the buttons. The fa-code-fork icon is very narrow and doesn't look good. Also update button text to just the action -> "Clone"
will always point to the existing clone URL which will later be modified to handle multiple arguments via query string
makes more sense to alert inside the function instead of delegating this to the caller. This is how selectedCheckboxes() works too and this function is kind of a duplicate almost!
| return false | ||
| } | ||
|
|
||
| window.location.assign(`/plan/0/clone/?p=${selectedTestPlans.join('&p=')}`) |
Check warning
Code scanning / CodeQL
DOM text reinterpreted as HTML Medium test
DOM text
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 5 months ago
To fix the issue, we need to sanitize or escape the DOM text before using it in the URL. The escapeHTML utility function, which is already imported in the file, can be used to escape special characters in the extracted text. This ensures that any malicious input is neutralized before being included in the URL. The fix involves applying escapeHTML to the id values returned by getChildRows before they are added to the tpIds array.
-
Copy modified line R253
| @@ -252,3 +252,3 @@ | ||
| const parentRow = $('#resultsTable').DataTable().row($(parentRowId).closest('tr')) | ||
| const id = $(parentRowId).closest('tr').find('td:nth-child(3)').text().trim() | ||
| const id = escapeHTML($(parentRowId).closest('tr').find('td:nth-child(3)').text().trim()) | ||
| const children = hiddenChildRows[id] |
Cherry-picks some of the initial work in #3985 and refactors it to better fit the existing code style and how we do things in Kiwi TCMS.
First batch of work focuses on the UI first.