v6: Strength ignores common symbols as special characters

Open Beginner friendly
#43,322 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@thejesh23 is already working on this.

Since Nov 8, 2026.

  • #43324 by @thejesh23 — open

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
76/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Domain
frontend

Research direction

The issue points to _calculateScore() in js/src/strength.ts; read its regexes and the related strength tests first. Compare the scores for the two example passwords and check how the listed symbols are handled. Done means common symbols such as - and _ contribute consistently with the existing special characters, with tests covering the examples.

Written by the indexing model from the issue text.

Description

bug confirmed docs has-pr js v6
Prerequisites
  • I have searched for duplicate or closed issues
  • I have validated any HTML to avoid common problems
  • I have read the contributing guidelines
Describe the issue

Strength only counts !@#$%^&*(),.?":{}|<> as special characters. Common symbols such as -, _, +, =, /, ~, ;, [, ] and spaces get no points.

Steps:

  1. Type Password1!! in a password field with data-bs-strength. It shows "Good".
  2. Type Password1--. It shows "Fair".

Expected: both passwords get the same score.

Reduced test cases

The regexes in _calculateScore() in js/src/strength.ts use a fixed symbol list.

What operating system(s) are you seeing the problem on?

macOS

What browser(s) are you seeing the problem on?

Chrome

What version of Bootstrap are you using?

main (v6.0.0-alpha.1)

Dominant language
MDX
Stars
175k
Forks
78.7k
Avg merge
1d 7h
Merged PRs (30d)
103

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from twbs/bootstrap

All issues in twbs/bootstrap

Similar issues

More Web Dev issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.