Skip to content

fix: resolve 4 bugs in leetcode-ranking - #391

Open
saurabhhhcodes wants to merge 1 commit into
codepvg:mainfrom
saurabhhhcodes:fix/leetcode-ranking-71059
Open

fix: resolve 4 bugs in leetcode-ranking#391
saurabhhhcodes wants to merge 1 commit into
codepvg:mainfrom
saurabhhhcodes:fix/leetcode-ranking-71059

Conversation

@saurabhhhcodes

Copy link
Copy Markdown

Description

This PR fixes real bugs found in the codebase:

  • Replaced innerHTML assignment with textContent: prevents HTML injection / XSS and is faster since it does not parse markup.
  • Replaced innerHTML assignment with textContent: prevents HTML injection / XSS and is faster since it does not parse markup.
  • Replaced innerHTML assignment with textContent: prevents HTML injection / XSS and is faster since it does not parse markup.
  • Fixed default sort: .sort() coerces elements to strings, so [10, 9, 2] sorts as [10, 2, 9]; numeric comparator sorts correctly.

Type of Change

  • Bug fix (non-breaking change fixing an issue)

How Has This Been Tested?

  • Local manual testing

Checklist

  • My code follows the style guidelines
  • I have performed a self-review

Related Issue

Ref: #386

@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Thank you for submitting a pull request.

Please ensure your changes comply with the project's contribution guidelines and that all workflow checks pass successfully.

Formatting and Branching

  • Please confirm you have formatted your code locally using npx prettier --write . before requesting a review.
  • Ensure this PR is made from a feature/* branch and not main.

Note: This project is currently maintained by a solo maintainer, so reviews and responses may sometimes take a little time. Thanks for your patience.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant