Skip to content

add html support for title and description#43

Open
SatishB15 wants to merge 1 commit into
tutkli:masterfrom
SatishB15:feature/is-html-pipe
Open

add html support for title and description#43
SatishB15 wants to merge 1 commit into
tutkli:masterfrom
SatishB15:feature/is-html-pipe

Conversation

@SatishB15

Copy link
Copy Markdown

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • Other... Please describe:

What is the current behavior?

  • The content or title passed to the notification only supports plain text.
  • If the value contains HTML tags (e.g., Warning), it is rendered as raw text, not formatted.
  • There is no automatic detection of HTML content.
  • Developers cannot display styled or formatted messages using innerHTML.

Example (before fix):
content: '<strong>Warning:</strong> Something went wrong'

Rendered as:
<strong>Warning:</strong> Something went wrong

Closes #42

What is the new behavior?

  • The notification system now detects when the content includes HTML.
  • If HTML is present, it is safely rendered inside a <span [innerHTML]="..."> wrapper.
  • If the content is plain text, it continues to display normally with no changes.
  • This allows developers to send formatted messages directly.

Example (after fix):
content: '<strong>Warning:</strong> Something went wrong'

Rendered as:
Warning: Something went wrong

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

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.

Add support for content using innerHTML

1 participant