Skip to content

fix(tooltip): preserve raw string title and content data attributes (#43090) - #43113

Merged
mdo merged 2 commits into
twbs:mainfrom
Aryan9891:fix/issue-43090
Nov 4, 2026
Merged

mdo merged 2 commits into
twbs:mainfrom
Aryan9891:fix/issue-43090

Conversation

@Aryan9891

@Aryan9891 Aryan9891 commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

Description

Preserve raw attribute strings for data-bs-title and data-bs-content in Tooltip._getConfig() and fallback null values to empty strings in _configAfterMerge().

Motivation & Context

Addresses #43090 where passing data-bs-title="9.90" resulted in automatic normalization via JSON.parse into numeric 9.9, and data-bs-title="" was normalized to null, causing the typecheck to throw an error and break subsequent tooltip initializations.

Type of changes

  • Bug fix (non-breaking change which fixes an issue)

Checklist

  • I have read the contributing guidelines
  • My code follows the code style of the project
  • My change introduces changes to the documentation
  • I have updated the documentation accordingly
  • I have added tests to cover my changes
  • All new and existing tests passed

Related issues

Refs #43090. This PR fixes v6; the issue stays open for the v5 backport.

  • Extend regression coverage for literal and empty titles, rendered Popover content, explicit options, and text/HTML sanitization.

@Aryan9891
Aryan9891 requested a review from a team as a code owner October 17, 2026 20:50
@julien-deramond julien-deramond added v6 v6, the main branch bug Something does not work as documented js JavaScript or TypeScript sources and plugins labels Oct 18, 2026
@Aryan9891
Aryan9891 force-pushed the fix/issue-43090 branch 6 times, most recently from cc73e87 to 2375df2 Compare October 27, 2026 20:05
@Aryan9891
Aryan9891 force-pushed the fix/issue-43090 branch 5 times, most recently from 053a5ea to 3fa6344 Compare November 1, 2026 07:21
…wbs#43090)

Signed-off-by: Aryan Sachin <aryansachinixd@gmail.com>
Cover empty and JSON-like titles, Popover rendering, explicit options,
and the text and sanitized HTML boundaries.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something does not work as documented js JavaScript or TypeScript sources and plugins v6 v6, the main branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants