[Search] fix: FormattedMessage rendering escaped HTML instead of markup#234079
Conversation
|
Do all open backport versions have this updated react-intl version? |
@wildemat Good question! I'm not entirely sure. As this bug goes all the way back to v8.15, I asked @TattdCodeMonkey how far back I should backport and he suggested I use the |
Good enough for me! |
💚 Build Succeeded
Metrics [docs]Async chunks
Saved Objects .kibana field count
|
|
Starting backport for target branches: 8.18, 8.19, 9.0, 9.1 |
…up (elastic#234079) ## Summary After upgrading to react-intl@6.6.6, `<FormattedMessage>` no longer renders raw HTML when returning strings from value formatters. Previously, returning a string like `"<strong>...</strong>"` would be interpreted as HTML and rendered. In v6, all strings are escaped for safety, and only React elements are rendered as markup. As a result, the `PagingInfoView` component which uses, `<FormattedMessage>`, was displaying `<strong>` tags as plain text instead of styled markup on the Docs Explorer page. This has been fixed by updating the strong property in `<FormattedMessage>` to return a React element. **Before** <img width="600" alt="Screenshot 2025-09-04 at 18 19 21" src="https://github.com/user-attachments/assets/b0024691-753c-47ab-8d5c-92e9e06d96a6" /> **After** <img width="600" alt="Screenshot 2025-09-04 at 18 27 04" src="https://github.com/user-attachments/assets/63de1c5e-e129-4dd0-9f79-3537196c3a4c" /> ### Checklist Check the PR satisfies following conditions. Reviewers should verify this PR satisfies this list as well. - [ ] ~Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)~ - [ ] ~[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials~ - [ ] ~[Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios~ - [ ] ~If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the [docker list]~(https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker) - [ ] ~This was checked for breaking HTTP API changes, and any breaking changes have been approved by the breaking-change committee. The `release_note:breaking` label should be applied in these situations.~ - [ ] ~[Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed~ - [x] The PR description includes the appropriate Release Notes section, and the correct `release_note:*` label is applied per the [guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) - [x] Review the [backport guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing) and apply applicable `backport:*` labels. ## Release note Fixes the Docs Explorer paging info to correctly render bold text. After upgrading to react-intl@6.6.6, the `<FormattedMessage>` component escaped HTML returned from value formatters, causing `<strong>` tags to appear as plain text. The component now uses React elements to render the bold text properly. (cherry picked from commit 760c553)
…up (elastic#234079) ## Summary After upgrading to react-intl@6.6.6, `<FormattedMessage>` no longer renders raw HTML when returning strings from value formatters. Previously, returning a string like `"<strong>...</strong>"` would be interpreted as HTML and rendered. In v6, all strings are escaped for safety, and only React elements are rendered as markup. As a result, the `PagingInfoView` component which uses, `<FormattedMessage>`, was displaying `<strong>` tags as plain text instead of styled markup on the Docs Explorer page. This has been fixed by updating the strong property in `<FormattedMessage>` to return a React element. **Before** <img width="600" alt="Screenshot 2025-09-04 at 18 19 21" src="https://github.com/user-attachments/assets/b0024691-753c-47ab-8d5c-92e9e06d96a6" /> **After** <img width="600" alt="Screenshot 2025-09-04 at 18 27 04" src="https://github.com/user-attachments/assets/63de1c5e-e129-4dd0-9f79-3537196c3a4c" /> ### Checklist Check the PR satisfies following conditions. Reviewers should verify this PR satisfies this list as well. - [ ] ~Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)~ - [ ] ~[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials~ - [ ] ~[Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios~ - [ ] ~If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the [docker list]~(https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker) - [ ] ~This was checked for breaking HTTP API changes, and any breaking changes have been approved by the breaking-change committee. The `release_note:breaking` label should be applied in these situations.~ - [ ] ~[Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed~ - [x] The PR description includes the appropriate Release Notes section, and the correct `release_note:*` label is applied per the [guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) - [x] Review the [backport guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing) and apply applicable `backport:*` labels. ## Release note Fixes the Docs Explorer paging info to correctly render bold text. After upgrading to react-intl@6.6.6, the `<FormattedMessage>` component escaped HTML returned from value formatters, causing `<strong>` tags to appear as plain text. The component now uses React elements to render the bold text properly. (cherry picked from commit 760c553)
…up (elastic#234079) ## Summary After upgrading to react-intl@6.6.6, `<FormattedMessage>` no longer renders raw HTML when returning strings from value formatters. Previously, returning a string like `"<strong>...</strong>"` would be interpreted as HTML and rendered. In v6, all strings are escaped for safety, and only React elements are rendered as markup. As a result, the `PagingInfoView` component which uses, `<FormattedMessage>`, was displaying `<strong>` tags as plain text instead of styled markup on the Docs Explorer page. This has been fixed by updating the strong property in `<FormattedMessage>` to return a React element. **Before** <img width="600" alt="Screenshot 2025-09-04 at 18 19 21" src="https://github.com/user-attachments/assets/b0024691-753c-47ab-8d5c-92e9e06d96a6" /> **After** <img width="600" alt="Screenshot 2025-09-04 at 18 27 04" src="https://github.com/user-attachments/assets/63de1c5e-e129-4dd0-9f79-3537196c3a4c" /> ### Checklist Check the PR satisfies following conditions. Reviewers should verify this PR satisfies this list as well. - [ ] ~Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)~ - [ ] ~[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials~ - [ ] ~[Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios~ - [ ] ~If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the [docker list]~(https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker) - [ ] ~This was checked for breaking HTTP API changes, and any breaking changes have been approved by the breaking-change committee. The `release_note:breaking` label should be applied in these situations.~ - [ ] ~[Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed~ - [x] The PR description includes the appropriate Release Notes section, and the correct `release_note:*` label is applied per the [guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) - [x] Review the [backport guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing) and apply applicable `backport:*` labels. ## Release note Fixes the Docs Explorer paging info to correctly render bold text. After upgrading to react-intl@6.6.6, the `<FormattedMessage>` component escaped HTML returned from value formatters, causing `<strong>` tags to appear as plain text. The component now uses React elements to render the bold text properly. (cherry picked from commit 760c553)
…up (elastic#234079) ## Summary After upgrading to react-intl@6.6.6, `<FormattedMessage>` no longer renders raw HTML when returning strings from value formatters. Previously, returning a string like `"<strong>...</strong>"` would be interpreted as HTML and rendered. In v6, all strings are escaped for safety, and only React elements are rendered as markup. As a result, the `PagingInfoView` component which uses, `<FormattedMessage>`, was displaying `<strong>` tags as plain text instead of styled markup on the Docs Explorer page. This has been fixed by updating the strong property in `<FormattedMessage>` to return a React element. **Before** <img width="600" alt="Screenshot 2025-09-04 at 18 19 21" src="https://github.com/user-attachments/assets/b0024691-753c-47ab-8d5c-92e9e06d96a6" /> **After** <img width="600" alt="Screenshot 2025-09-04 at 18 27 04" src="https://github.com/user-attachments/assets/63de1c5e-e129-4dd0-9f79-3537196c3a4c" /> ### Checklist Check the PR satisfies following conditions. Reviewers should verify this PR satisfies this list as well. - [ ] ~Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)~ - [ ] ~[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials~ - [ ] ~[Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios~ - [ ] ~If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the [docker list]~(https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker) - [ ] ~This was checked for breaking HTTP API changes, and any breaking changes have been approved by the breaking-change committee. The `release_note:breaking` label should be applied in these situations.~ - [ ] ~[Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed~ - [x] The PR description includes the appropriate Release Notes section, and the correct `release_note:*` label is applied per the [guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) - [x] Review the [backport guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing) and apply applicable `backport:*` labels. ## Release note Fixes the Docs Explorer paging info to correctly render bold text. After upgrading to react-intl@6.6.6, the `<FormattedMessage>` component escaped HTML returned from value formatters, causing `<strong>` tags to appear as plain text. The component now uses React elements to render the bold text properly. (cherry picked from commit 760c553)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…f markup (#234079) (#234134) # Backport This will backport the following commits from `main` to `9.1`: - [[Search] fix: FormattedMessage rendering escaped HTML instead of markup (#234079)](#234079) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Brittany","email":"seialkali@gmail.com"},"sourceCommit":{"committedDate":"2025-09-05T08:05:07Z","message":"[Search] fix: FormattedMessage rendering escaped HTML instead of markup (#234079)\n\n## Summary\n\nAfter upgrading to react-intl@6.6.6, `<FormattedMessage>` no longer\nrenders raw HTML when returning strings from value formatters.\nPreviously, returning a string like `\"<strong>...</strong>\"` would be\ninterpreted as HTML and rendered. In v6, all strings are escaped for\nsafety, and only React elements are rendered as markup.\n\nAs a result, the `PagingInfoView` component which uses,\n`<FormattedMessage>`, was displaying `<strong>` tags as plain text\ninstead of styled markup on the Docs Explorer page. This has been fixed\nby updating the strong property in `<FormattedMessage>` to return a\nReact element.\n\n**Before**\n\n<img width=\"600\" alt=\"Screenshot 2025-09-04 at 18 19 21\"\nsrc=\"https://github.com/user-attachments/assets/b0024691-753c-47ab-8d5c-92e9e06d96a6\"\n/>\n\n**After**\n\n<img width=\"600\" alt=\"Screenshot 2025-09-04 at 18 27 04\"\nsrc=\"https://github.com/user-attachments/assets/63de1c5e-e129-4dd0-9f79-3537196c3a4c\"\n/>\n\n### Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers should verify this PR satisfies this list as well.\n\n- [ ] ~Any text added follows [EUI's writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing), uses\nsentence case text and includes [i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)~\n- [ ]\n~[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas added for features that require explanation or tutorials~\n- [ ] ~[Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios~\n- [ ] ~If a plugin configuration key changed, check if it needs to be\nallowlisted in the cloud and added to the [docker\nlist]~(https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\n- [ ] ~This was checked for breaking HTTP API changes, and any breaking\nchanges have been approved by the breaking-change committee. The\n`release_note:breaking` label should be applied in these situations.~\n- [ ] ~[Flaky Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\nused on any tests changed~\n- [x] The PR description includes the appropriate Release Notes section,\nand the correct `release_note:*` label is applied per the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n- [x] Review the [backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand apply applicable `backport:*` labels.\n\n## Release note\n\nFixes the Docs Explorer paging info to correctly render bold text. After\nupgrading to react-intl@6.6.6, the `<FormattedMessage>` component\nescaped HTML returned from value formatters, causing `<strong>` tags to\nappear as plain text. The component now uses React elements to render\nthe bold text properly.","sha":"760c5535685c46a429e07d9eaae8d9cd2972096f","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:Search","backport:all-open","v9.2.0"],"title":"[Search] fix: FormattedMessage rendering escaped HTML instead of markup","number":234079,"url":"https://github.com/elastic/kibana/pull/234079","mergeCommit":{"message":"[Search] fix: FormattedMessage rendering escaped HTML instead of markup (#234079)\n\n## Summary\n\nAfter upgrading to react-intl@6.6.6, `<FormattedMessage>` no longer\nrenders raw HTML when returning strings from value formatters.\nPreviously, returning a string like `\"<strong>...</strong>\"` would be\ninterpreted as HTML and rendered. In v6, all strings are escaped for\nsafety, and only React elements are rendered as markup.\n\nAs a result, the `PagingInfoView` component which uses,\n`<FormattedMessage>`, was displaying `<strong>` tags as plain text\ninstead of styled markup on the Docs Explorer page. This has been fixed\nby updating the strong property in `<FormattedMessage>` to return a\nReact element.\n\n**Before**\n\n<img width=\"600\" alt=\"Screenshot 2025-09-04 at 18 19 21\"\nsrc=\"https://github.com/user-attachments/assets/b0024691-753c-47ab-8d5c-92e9e06d96a6\"\n/>\n\n**After**\n\n<img width=\"600\" alt=\"Screenshot 2025-09-04 at 18 27 04\"\nsrc=\"https://github.com/user-attachments/assets/63de1c5e-e129-4dd0-9f79-3537196c3a4c\"\n/>\n\n### Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers should verify this PR satisfies this list as well.\n\n- [ ] ~Any text added follows [EUI's writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing), uses\nsentence case text and includes [i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)~\n- [ ]\n~[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas added for features that require explanation or tutorials~\n- [ ] ~[Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios~\n- [ ] ~If a plugin configuration key changed, check if it needs to be\nallowlisted in the cloud and added to the [docker\nlist]~(https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\n- [ ] ~This was checked for breaking HTTP API changes, and any breaking\nchanges have been approved by the breaking-change committee. The\n`release_note:breaking` label should be applied in these situations.~\n- [ ] ~[Flaky Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\nused on any tests changed~\n- [x] The PR description includes the appropriate Release Notes section,\nand the correct `release_note:*` label is applied per the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n- [x] Review the [backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand apply applicable `backport:*` labels.\n\n## Release note\n\nFixes the Docs Explorer paging info to correctly render bold text. After\nupgrading to react-intl@6.6.6, the `<FormattedMessage>` component\nescaped HTML returned from value formatters, causing `<strong>` tags to\nappear as plain text. The component now uses React elements to render\nthe bold text properly.","sha":"760c5535685c46a429e07d9eaae8d9cd2972096f"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/234079","number":234079,"mergeCommit":{"message":"[Search] fix: FormattedMessage rendering escaped HTML instead of markup (#234079)\n\n## Summary\n\nAfter upgrading to react-intl@6.6.6, `<FormattedMessage>` no longer\nrenders raw HTML when returning strings from value formatters.\nPreviously, returning a string like `\"<strong>...</strong>\"` would be\ninterpreted as HTML and rendered. In v6, all strings are escaped for\nsafety, and only React elements are rendered as markup.\n\nAs a result, the `PagingInfoView` component which uses,\n`<FormattedMessage>`, was displaying `<strong>` tags as plain text\ninstead of styled markup on the Docs Explorer page. This has been fixed\nby updating the strong property in `<FormattedMessage>` to return a\nReact element.\n\n**Before**\n\n<img width=\"600\" alt=\"Screenshot 2025-09-04 at 18 19 21\"\nsrc=\"https://github.com/user-attachments/assets/b0024691-753c-47ab-8d5c-92e9e06d96a6\"\n/>\n\n**After**\n\n<img width=\"600\" alt=\"Screenshot 2025-09-04 at 18 27 04\"\nsrc=\"https://github.com/user-attachments/assets/63de1c5e-e129-4dd0-9f79-3537196c3a4c\"\n/>\n\n### Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers should verify this PR satisfies this list as well.\n\n- [ ] ~Any text added follows [EUI's writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing), uses\nsentence case text and includes [i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)~\n- [ ]\n~[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas added for features that require explanation or tutorials~\n- [ ] ~[Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios~\n- [ ] ~If a plugin configuration key changed, check if it needs to be\nallowlisted in the cloud and added to the [docker\nlist]~(https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\n- [ ] ~This was checked for breaking HTTP API changes, and any breaking\nchanges have been approved by the breaking-change committee. The\n`release_note:breaking` label should be applied in these situations.~\n- [ ] ~[Flaky Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\nused on any tests changed~\n- [x] The PR description includes the appropriate Release Notes section,\nand the correct `release_note:*` label is applied per the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n- [x] Review the [backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand apply applicable `backport:*` labels.\n\n## Release note\n\nFixes the Docs Explorer paging info to correctly render bold text. After\nupgrading to react-intl@6.6.6, the `<FormattedMessage>` component\nescaped HTML returned from value formatters, causing `<strong>` tags to\nappear as plain text. The component now uses React elements to render\nthe bold text properly.","sha":"760c5535685c46a429e07d9eaae8d9cd2972096f"}}]}] BACKPORT--> Co-authored-by: Brittany <seialkali@gmail.com>
…of markup (#234079) (#234132) # Backport This will backport the following commits from `main` to `8.19`: - [[Search] fix: FormattedMessage rendering escaped HTML instead of markup (#234079)](#234079) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Brittany","email":"seialkali@gmail.com"},"sourceCommit":{"committedDate":"2025-09-05T08:05:07Z","message":"[Search] fix: FormattedMessage rendering escaped HTML instead of markup (#234079)\n\n## Summary\n\nAfter upgrading to react-intl@6.6.6, `<FormattedMessage>` no longer\nrenders raw HTML when returning strings from value formatters.\nPreviously, returning a string like `\"<strong>...</strong>\"` would be\ninterpreted as HTML and rendered. In v6, all strings are escaped for\nsafety, and only React elements are rendered as markup.\n\nAs a result, the `PagingInfoView` component which uses,\n`<FormattedMessage>`, was displaying `<strong>` tags as plain text\ninstead of styled markup on the Docs Explorer page. This has been fixed\nby updating the strong property in `<FormattedMessage>` to return a\nReact element.\n\n**Before**\n\n<img width=\"600\" alt=\"Screenshot 2025-09-04 at 18 19 21\"\nsrc=\"https://github.com/user-attachments/assets/b0024691-753c-47ab-8d5c-92e9e06d96a6\"\n/>\n\n**After**\n\n<img width=\"600\" alt=\"Screenshot 2025-09-04 at 18 27 04\"\nsrc=\"https://github.com/user-attachments/assets/63de1c5e-e129-4dd0-9f79-3537196c3a4c\"\n/>\n\n### Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers should verify this PR satisfies this list as well.\n\n- [ ] ~Any text added follows [EUI's writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing), uses\nsentence case text and includes [i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)~\n- [ ]\n~[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas added for features that require explanation or tutorials~\n- [ ] ~[Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios~\n- [ ] ~If a plugin configuration key changed, check if it needs to be\nallowlisted in the cloud and added to the [docker\nlist]~(https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\n- [ ] ~This was checked for breaking HTTP API changes, and any breaking\nchanges have been approved by the breaking-change committee. The\n`release_note:breaking` label should be applied in these situations.~\n- [ ] ~[Flaky Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\nused on any tests changed~\n- [x] The PR description includes the appropriate Release Notes section,\nand the correct `release_note:*` label is applied per the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n- [x] Review the [backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand apply applicable `backport:*` labels.\n\n## Release note\n\nFixes the Docs Explorer paging info to correctly render bold text. After\nupgrading to react-intl@6.6.6, the `<FormattedMessage>` component\nescaped HTML returned from value formatters, causing `<strong>` tags to\nappear as plain text. The component now uses React elements to render\nthe bold text properly.","sha":"760c5535685c46a429e07d9eaae8d9cd2972096f","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:Search","backport:all-open","v9.2.0"],"title":"[Search] fix: FormattedMessage rendering escaped HTML instead of markup","number":234079,"url":"https://github.com/elastic/kibana/pull/234079","mergeCommit":{"message":"[Search] fix: FormattedMessage rendering escaped HTML instead of markup (#234079)\n\n## Summary\n\nAfter upgrading to react-intl@6.6.6, `<FormattedMessage>` no longer\nrenders raw HTML when returning strings from value formatters.\nPreviously, returning a string like `\"<strong>...</strong>\"` would be\ninterpreted as HTML and rendered. In v6, all strings are escaped for\nsafety, and only React elements are rendered as markup.\n\nAs a result, the `PagingInfoView` component which uses,\n`<FormattedMessage>`, was displaying `<strong>` tags as plain text\ninstead of styled markup on the Docs Explorer page. This has been fixed\nby updating the strong property in `<FormattedMessage>` to return a\nReact element.\n\n**Before**\n\n<img width=\"600\" alt=\"Screenshot 2025-09-04 at 18 19 21\"\nsrc=\"https://github.com/user-attachments/assets/b0024691-753c-47ab-8d5c-92e9e06d96a6\"\n/>\n\n**After**\n\n<img width=\"600\" alt=\"Screenshot 2025-09-04 at 18 27 04\"\nsrc=\"https://github.com/user-attachments/assets/63de1c5e-e129-4dd0-9f79-3537196c3a4c\"\n/>\n\n### Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers should verify this PR satisfies this list as well.\n\n- [ ] ~Any text added follows [EUI's writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing), uses\nsentence case text and includes [i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)~\n- [ ]\n~[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas added for features that require explanation or tutorials~\n- [ ] ~[Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios~\n- [ ] ~If a plugin configuration key changed, check if it needs to be\nallowlisted in the cloud and added to the [docker\nlist]~(https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\n- [ ] ~This was checked for breaking HTTP API changes, and any breaking\nchanges have been approved by the breaking-change committee. The\n`release_note:breaking` label should be applied in these situations.~\n- [ ] ~[Flaky Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\nused on any tests changed~\n- [x] The PR description includes the appropriate Release Notes section,\nand the correct `release_note:*` label is applied per the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n- [x] Review the [backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand apply applicable `backport:*` labels.\n\n## Release note\n\nFixes the Docs Explorer paging info to correctly render bold text. After\nupgrading to react-intl@6.6.6, the `<FormattedMessage>` component\nescaped HTML returned from value formatters, causing `<strong>` tags to\nappear as plain text. The component now uses React elements to render\nthe bold text properly.","sha":"760c5535685c46a429e07d9eaae8d9cd2972096f"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/234079","number":234079,"mergeCommit":{"message":"[Search] fix: FormattedMessage rendering escaped HTML instead of markup (#234079)\n\n## Summary\n\nAfter upgrading to react-intl@6.6.6, `<FormattedMessage>` no longer\nrenders raw HTML when returning strings from value formatters.\nPreviously, returning a string like `\"<strong>...</strong>\"` would be\ninterpreted as HTML and rendered. In v6, all strings are escaped for\nsafety, and only React elements are rendered as markup.\n\nAs a result, the `PagingInfoView` component which uses,\n`<FormattedMessage>`, was displaying `<strong>` tags as plain text\ninstead of styled markup on the Docs Explorer page. This has been fixed\nby updating the strong property in `<FormattedMessage>` to return a\nReact element.\n\n**Before**\n\n<img width=\"600\" alt=\"Screenshot 2025-09-04 at 18 19 21\"\nsrc=\"https://github.com/user-attachments/assets/b0024691-753c-47ab-8d5c-92e9e06d96a6\"\n/>\n\n**After**\n\n<img width=\"600\" alt=\"Screenshot 2025-09-04 at 18 27 04\"\nsrc=\"https://github.com/user-attachments/assets/63de1c5e-e129-4dd0-9f79-3537196c3a4c\"\n/>\n\n### Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers should verify this PR satisfies this list as well.\n\n- [ ] ~Any text added follows [EUI's writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing), uses\nsentence case text and includes [i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)~\n- [ ]\n~[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas added for features that require explanation or tutorials~\n- [ ] ~[Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios~\n- [ ] ~If a plugin configuration key changed, check if it needs to be\nallowlisted in the cloud and added to the [docker\nlist]~(https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\n- [ ] ~This was checked for breaking HTTP API changes, and any breaking\nchanges have been approved by the breaking-change committee. The\n`release_note:breaking` label should be applied in these situations.~\n- [ ] ~[Flaky Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\nused on any tests changed~\n- [x] The PR description includes the appropriate Release Notes section,\nand the correct `release_note:*` label is applied per the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n- [x] Review the [backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand apply applicable `backport:*` labels.\n\n## Release note\n\nFixes the Docs Explorer paging info to correctly render bold text. After\nupgrading to react-intl@6.6.6, the `<FormattedMessage>` component\nescaped HTML returned from value formatters, causing `<strong>` tags to\nappear as plain text. The component now uses React elements to render\nthe bold text properly.","sha":"760c5535685c46a429e07d9eaae8d9cd2972096f"}}]}] BACKPORT--> Co-authored-by: Brittany <seialkali@gmail.com>
…f markup (#234079) (#234133) # Backport This will backport the following commits from `main` to `9.0`: - [[Search] fix: FormattedMessage rendering escaped HTML instead of markup (#234079)](#234079) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Brittany","email":"seialkali@gmail.com"},"sourceCommit":{"committedDate":"2025-09-05T08:05:07Z","message":"[Search] fix: FormattedMessage rendering escaped HTML instead of markup (#234079)\n\n## Summary\n\nAfter upgrading to react-intl@6.6.6, `<FormattedMessage>` no longer\nrenders raw HTML when returning strings from value formatters.\nPreviously, returning a string like `\"<strong>...</strong>\"` would be\ninterpreted as HTML and rendered. In v6, all strings are escaped for\nsafety, and only React elements are rendered as markup.\n\nAs a result, the `PagingInfoView` component which uses,\n`<FormattedMessage>`, was displaying `<strong>` tags as plain text\ninstead of styled markup on the Docs Explorer page. This has been fixed\nby updating the strong property in `<FormattedMessage>` to return a\nReact element.\n\n**Before**\n\n<img width=\"600\" alt=\"Screenshot 2025-09-04 at 18 19 21\"\nsrc=\"https://github.com/user-attachments/assets/b0024691-753c-47ab-8d5c-92e9e06d96a6\"\n/>\n\n**After**\n\n<img width=\"600\" alt=\"Screenshot 2025-09-04 at 18 27 04\"\nsrc=\"https://github.com/user-attachments/assets/63de1c5e-e129-4dd0-9f79-3537196c3a4c\"\n/>\n\n### Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers should verify this PR satisfies this list as well.\n\n- [ ] ~Any text added follows [EUI's writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing), uses\nsentence case text and includes [i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)~\n- [ ]\n~[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas added for features that require explanation or tutorials~\n- [ ] ~[Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios~\n- [ ] ~If a plugin configuration key changed, check if it needs to be\nallowlisted in the cloud and added to the [docker\nlist]~(https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\n- [ ] ~This was checked for breaking HTTP API changes, and any breaking\nchanges have been approved by the breaking-change committee. The\n`release_note:breaking` label should be applied in these situations.~\n- [ ] ~[Flaky Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\nused on any tests changed~\n- [x] The PR description includes the appropriate Release Notes section,\nand the correct `release_note:*` label is applied per the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n- [x] Review the [backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand apply applicable `backport:*` labels.\n\n## Release note\n\nFixes the Docs Explorer paging info to correctly render bold text. After\nupgrading to react-intl@6.6.6, the `<FormattedMessage>` component\nescaped HTML returned from value formatters, causing `<strong>` tags to\nappear as plain text. The component now uses React elements to render\nthe bold text properly.","sha":"760c5535685c46a429e07d9eaae8d9cd2972096f","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:Search","backport:all-open","v9.2.0"],"title":"[Search] fix: FormattedMessage rendering escaped HTML instead of markup","number":234079,"url":"https://github.com/elastic/kibana/pull/234079","mergeCommit":{"message":"[Search] fix: FormattedMessage rendering escaped HTML instead of markup (#234079)\n\n## Summary\n\nAfter upgrading to react-intl@6.6.6, `<FormattedMessage>` no longer\nrenders raw HTML when returning strings from value formatters.\nPreviously, returning a string like `\"<strong>...</strong>\"` would be\ninterpreted as HTML and rendered. In v6, all strings are escaped for\nsafety, and only React elements are rendered as markup.\n\nAs a result, the `PagingInfoView` component which uses,\n`<FormattedMessage>`, was displaying `<strong>` tags as plain text\ninstead of styled markup on the Docs Explorer page. This has been fixed\nby updating the strong property in `<FormattedMessage>` to return a\nReact element.\n\n**Before**\n\n<img width=\"600\" alt=\"Screenshot 2025-09-04 at 18 19 21\"\nsrc=\"https://github.com/user-attachments/assets/b0024691-753c-47ab-8d5c-92e9e06d96a6\"\n/>\n\n**After**\n\n<img width=\"600\" alt=\"Screenshot 2025-09-04 at 18 27 04\"\nsrc=\"https://github.com/user-attachments/assets/63de1c5e-e129-4dd0-9f79-3537196c3a4c\"\n/>\n\n### Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers should verify this PR satisfies this list as well.\n\n- [ ] ~Any text added follows [EUI's writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing), uses\nsentence case text and includes [i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)~\n- [ ]\n~[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas added for features that require explanation or tutorials~\n- [ ] ~[Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios~\n- [ ] ~If a plugin configuration key changed, check if it needs to be\nallowlisted in the cloud and added to the [docker\nlist]~(https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\n- [ ] ~This was checked for breaking HTTP API changes, and any breaking\nchanges have been approved by the breaking-change committee. The\n`release_note:breaking` label should be applied in these situations.~\n- [ ] ~[Flaky Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\nused on any tests changed~\n- [x] The PR description includes the appropriate Release Notes section,\nand the correct `release_note:*` label is applied per the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n- [x] Review the [backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand apply applicable `backport:*` labels.\n\n## Release note\n\nFixes the Docs Explorer paging info to correctly render bold text. After\nupgrading to react-intl@6.6.6, the `<FormattedMessage>` component\nescaped HTML returned from value formatters, causing `<strong>` tags to\nappear as plain text. The component now uses React elements to render\nthe bold text properly.","sha":"760c5535685c46a429e07d9eaae8d9cd2972096f"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/234079","number":234079,"mergeCommit":{"message":"[Search] fix: FormattedMessage rendering escaped HTML instead of markup (#234079)\n\n## Summary\n\nAfter upgrading to react-intl@6.6.6, `<FormattedMessage>` no longer\nrenders raw HTML when returning strings from value formatters.\nPreviously, returning a string like `\"<strong>...</strong>\"` would be\ninterpreted as HTML and rendered. In v6, all strings are escaped for\nsafety, and only React elements are rendered as markup.\n\nAs a result, the `PagingInfoView` component which uses,\n`<FormattedMessage>`, was displaying `<strong>` tags as plain text\ninstead of styled markup on the Docs Explorer page. This has been fixed\nby updating the strong property in `<FormattedMessage>` to return a\nReact element.\n\n**Before**\n\n<img width=\"600\" alt=\"Screenshot 2025-09-04 at 18 19 21\"\nsrc=\"https://github.com/user-attachments/assets/b0024691-753c-47ab-8d5c-92e9e06d96a6\"\n/>\n\n**After**\n\n<img width=\"600\" alt=\"Screenshot 2025-09-04 at 18 27 04\"\nsrc=\"https://github.com/user-attachments/assets/63de1c5e-e129-4dd0-9f79-3537196c3a4c\"\n/>\n\n### Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers should verify this PR satisfies this list as well.\n\n- [ ] ~Any text added follows [EUI's writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing), uses\nsentence case text and includes [i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)~\n- [ ]\n~[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas added for features that require explanation or tutorials~\n- [ ] ~[Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios~\n- [ ] ~If a plugin configuration key changed, check if it needs to be\nallowlisted in the cloud and added to the [docker\nlist]~(https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\n- [ ] ~This was checked for breaking HTTP API changes, and any breaking\nchanges have been approved by the breaking-change committee. The\n`release_note:breaking` label should be applied in these situations.~\n- [ ] ~[Flaky Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\nused on any tests changed~\n- [x] The PR description includes the appropriate Release Notes section,\nand the correct `release_note:*` label is applied per the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n- [x] Review the [backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand apply applicable `backport:*` labels.\n\n## Release note\n\nFixes the Docs Explorer paging info to correctly render bold text. After\nupgrading to react-intl@6.6.6, the `<FormattedMessage>` component\nescaped HTML returned from value formatters, causing `<strong>` tags to\nappear as plain text. The component now uses React elements to render\nthe bold text properly.","sha":"760c5535685c46a429e07d9eaae8d9cd2972096f"}}]}] BACKPORT--> Co-authored-by: Brittany <seialkali@gmail.com>
…of markup (#234079) (#234131) # Backport This will backport the following commits from `main` to `8.18`: - [[Search] fix: FormattedMessage rendering escaped HTML instead of markup (#234079)](#234079) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Brittany","email":"seialkali@gmail.com"},"sourceCommit":{"committedDate":"2025-09-05T08:05:07Z","message":"[Search] fix: FormattedMessage rendering escaped HTML instead of markup (#234079)\n\n## Summary\n\nAfter upgrading to react-intl@6.6.6, `<FormattedMessage>` no longer\nrenders raw HTML when returning strings from value formatters.\nPreviously, returning a string like `\"<strong>...</strong>\"` would be\ninterpreted as HTML and rendered. In v6, all strings are escaped for\nsafety, and only React elements are rendered as markup.\n\nAs a result, the `PagingInfoView` component which uses,\n`<FormattedMessage>`, was displaying `<strong>` tags as plain text\ninstead of styled markup on the Docs Explorer page. This has been fixed\nby updating the strong property in `<FormattedMessage>` to return a\nReact element.\n\n**Before**\n\n<img width=\"600\" alt=\"Screenshot 2025-09-04 at 18 19 21\"\nsrc=\"https://github.com/user-attachments/assets/b0024691-753c-47ab-8d5c-92e9e06d96a6\"\n/>\n\n**After**\n\n<img width=\"600\" alt=\"Screenshot 2025-09-04 at 18 27 04\"\nsrc=\"https://github.com/user-attachments/assets/63de1c5e-e129-4dd0-9f79-3537196c3a4c\"\n/>\n\n### Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers should verify this PR satisfies this list as well.\n\n- [ ] ~Any text added follows [EUI's writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing), uses\nsentence case text and includes [i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)~\n- [ ]\n~[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas added for features that require explanation or tutorials~\n- [ ] ~[Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios~\n- [ ] ~If a plugin configuration key changed, check if it needs to be\nallowlisted in the cloud and added to the [docker\nlist]~(https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\n- [ ] ~This was checked for breaking HTTP API changes, and any breaking\nchanges have been approved by the breaking-change committee. The\n`release_note:breaking` label should be applied in these situations.~\n- [ ] ~[Flaky Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\nused on any tests changed~\n- [x] The PR description includes the appropriate Release Notes section,\nand the correct `release_note:*` label is applied per the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n- [x] Review the [backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand apply applicable `backport:*` labels.\n\n## Release note\n\nFixes the Docs Explorer paging info to correctly render bold text. After\nupgrading to react-intl@6.6.6, the `<FormattedMessage>` component\nescaped HTML returned from value formatters, causing `<strong>` tags to\nappear as plain text. The component now uses React elements to render\nthe bold text properly.","sha":"760c5535685c46a429e07d9eaae8d9cd2972096f","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:Search","backport:all-open","v9.2.0"],"title":"[Search] fix: FormattedMessage rendering escaped HTML instead of markup","number":234079,"url":"https://github.com/elastic/kibana/pull/234079","mergeCommit":{"message":"[Search] fix: FormattedMessage rendering escaped HTML instead of markup (#234079)\n\n## Summary\n\nAfter upgrading to react-intl@6.6.6, `<FormattedMessage>` no longer\nrenders raw HTML when returning strings from value formatters.\nPreviously, returning a string like `\"<strong>...</strong>\"` would be\ninterpreted as HTML and rendered. In v6, all strings are escaped for\nsafety, and only React elements are rendered as markup.\n\nAs a result, the `PagingInfoView` component which uses,\n`<FormattedMessage>`, was displaying `<strong>` tags as plain text\ninstead of styled markup on the Docs Explorer page. This has been fixed\nby updating the strong property in `<FormattedMessage>` to return a\nReact element.\n\n**Before**\n\n<img width=\"600\" alt=\"Screenshot 2025-09-04 at 18 19 21\"\nsrc=\"https://github.com/user-attachments/assets/b0024691-753c-47ab-8d5c-92e9e06d96a6\"\n/>\n\n**After**\n\n<img width=\"600\" alt=\"Screenshot 2025-09-04 at 18 27 04\"\nsrc=\"https://github.com/user-attachments/assets/63de1c5e-e129-4dd0-9f79-3537196c3a4c\"\n/>\n\n### Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers should verify this PR satisfies this list as well.\n\n- [ ] ~Any text added follows [EUI's writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing), uses\nsentence case text and includes [i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)~\n- [ ]\n~[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas added for features that require explanation or tutorials~\n- [ ] ~[Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios~\n- [ ] ~If a plugin configuration key changed, check if it needs to be\nallowlisted in the cloud and added to the [docker\nlist]~(https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\n- [ ] ~This was checked for breaking HTTP API changes, and any breaking\nchanges have been approved by the breaking-change committee. The\n`release_note:breaking` label should be applied in these situations.~\n- [ ] ~[Flaky Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\nused on any tests changed~\n- [x] The PR description includes the appropriate Release Notes section,\nand the correct `release_note:*` label is applied per the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n- [x] Review the [backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand apply applicable `backport:*` labels.\n\n## Release note\n\nFixes the Docs Explorer paging info to correctly render bold text. After\nupgrading to react-intl@6.6.6, the `<FormattedMessage>` component\nescaped HTML returned from value formatters, causing `<strong>` tags to\nappear as plain text. The component now uses React elements to render\nthe bold text properly.","sha":"760c5535685c46a429e07d9eaae8d9cd2972096f"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/234079","number":234079,"mergeCommit":{"message":"[Search] fix: FormattedMessage rendering escaped HTML instead of markup (#234079)\n\n## Summary\n\nAfter upgrading to react-intl@6.6.6, `<FormattedMessage>` no longer\nrenders raw HTML when returning strings from value formatters.\nPreviously, returning a string like `\"<strong>...</strong>\"` would be\ninterpreted as HTML and rendered. In v6, all strings are escaped for\nsafety, and only React elements are rendered as markup.\n\nAs a result, the `PagingInfoView` component which uses,\n`<FormattedMessage>`, was displaying `<strong>` tags as plain text\ninstead of styled markup on the Docs Explorer page. This has been fixed\nby updating the strong property in `<FormattedMessage>` to return a\nReact element.\n\n**Before**\n\n<img width=\"600\" alt=\"Screenshot 2025-09-04 at 18 19 21\"\nsrc=\"https://github.com/user-attachments/assets/b0024691-753c-47ab-8d5c-92e9e06d96a6\"\n/>\n\n**After**\n\n<img width=\"600\" alt=\"Screenshot 2025-09-04 at 18 27 04\"\nsrc=\"https://github.com/user-attachments/assets/63de1c5e-e129-4dd0-9f79-3537196c3a4c\"\n/>\n\n### Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers should verify this PR satisfies this list as well.\n\n- [ ] ~Any text added follows [EUI's writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing), uses\nsentence case text and includes [i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)~\n- [ ]\n~[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas added for features that require explanation or tutorials~\n- [ ] ~[Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios~\n- [ ] ~If a plugin configuration key changed, check if it needs to be\nallowlisted in the cloud and added to the [docker\nlist]~(https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\n- [ ] ~This was checked for breaking HTTP API changes, and any breaking\nchanges have been approved by the breaking-change committee. The\n`release_note:breaking` label should be applied in these situations.~\n- [ ] ~[Flaky Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\nused on any tests changed~\n- [x] The PR description includes the appropriate Release Notes section,\nand the correct `release_note:*` label is applied per the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n- [x] Review the [backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand apply applicable `backport:*` labels.\n\n## Release note\n\nFixes the Docs Explorer paging info to correctly render bold text. After\nupgrading to react-intl@6.6.6, the `<FormattedMessage>` component\nescaped HTML returned from value formatters, causing `<strong>` tags to\nappear as plain text. The component now uses React elements to render\nthe bold text properly.","sha":"760c5535685c46a429e07d9eaae8d9cd2972096f"}}]}] BACKPORT--> Co-authored-by: Brittany <seialkali@gmail.com>
…up (elastic#234079) ## Summary After upgrading to react-intl@6.6.6, `<FormattedMessage>` no longer renders raw HTML when returning strings from value formatters. Previously, returning a string like `"<strong>...</strong>"` would be interpreted as HTML and rendered. In v6, all strings are escaped for safety, and only React elements are rendered as markup. As a result, the `PagingInfoView` component which uses, `<FormattedMessage>`, was displaying `<strong>` tags as plain text instead of styled markup on the Docs Explorer page. This has been fixed by updating the strong property in `<FormattedMessage>` to return a React element. **Before** <img width="600" alt="Screenshot 2025-09-04 at 18 19 21" src="https://github.com/user-attachments/assets/b0024691-753c-47ab-8d5c-92e9e06d96a6" /> **After** <img width="600" alt="Screenshot 2025-09-04 at 18 27 04" src="https://github.com/user-attachments/assets/63de1c5e-e129-4dd0-9f79-3537196c3a4c" /> ### Checklist Check the PR satisfies following conditions. Reviewers should verify this PR satisfies this list as well. - [ ] ~Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)~ - [ ] ~[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials~ - [ ] ~[Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios~ - [ ] ~If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the [docker list]~(https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker) - [ ] ~This was checked for breaking HTTP API changes, and any breaking changes have been approved by the breaking-change committee. The `release_note:breaking` label should be applied in these situations.~ - [ ] ~[Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed~ - [x] The PR description includes the appropriate Release Notes section, and the correct `release_note:*` label is applied per the [guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) - [x] Review the [backport guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing) and apply applicable `backport:*` labels. ## Release note Fixes the Docs Explorer paging info to correctly render bold text. After upgrading to react-intl@6.6.6, the `<FormattedMessage>` component escaped HTML returned from value formatters, causing `<strong>` tags to appear as plain text. The component now uses React elements to render the bold text properly.
…up (elastic#234079) ## Summary After upgrading to react-intl@6.6.6, `<FormattedMessage>` no longer renders raw HTML when returning strings from value formatters. Previously, returning a string like `"<strong>...</strong>"` would be interpreted as HTML and rendered. In v6, all strings are escaped for safety, and only React elements are rendered as markup. As a result, the `PagingInfoView` component which uses, `<FormattedMessage>`, was displaying `<strong>` tags as plain text instead of styled markup on the Docs Explorer page. This has been fixed by updating the strong property in `<FormattedMessage>` to return a React element. **Before** <img width="600" alt="Screenshot 2025-09-04 at 18 19 21" src="https://github.com/user-attachments/assets/b0024691-753c-47ab-8d5c-92e9e06d96a6" /> **After** <img width="600" alt="Screenshot 2025-09-04 at 18 27 04" src="https://github.com/user-attachments/assets/63de1c5e-e129-4dd0-9f79-3537196c3a4c" /> ### Checklist Check the PR satisfies following conditions. Reviewers should verify this PR satisfies this list as well. - [ ] ~Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)~ - [ ] ~[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials~ - [ ] ~[Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios~ - [ ] ~If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the [docker list]~(https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker) - [ ] ~This was checked for breaking HTTP API changes, and any breaking changes have been approved by the breaking-change committee. The `release_note:breaking` label should be applied in these situations.~ - [ ] ~[Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed~ - [x] The PR description includes the appropriate Release Notes section, and the correct `release_note:*` label is applied per the [guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) - [x] Review the [backport guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing) and apply applicable `backport:*` labels. ## Release note Fixes the Docs Explorer paging info to correctly render bold text. After upgrading to react-intl@6.6.6, the `<FormattedMessage>` component escaped HTML returned from value formatters, causing `<strong>` tags to appear as plain text. The component now uses React elements to render the bold text properly.
…up (elastic#234079) ## Summary After upgrading to react-intl@6.6.6, `<FormattedMessage>` no longer renders raw HTML when returning strings from value formatters. Previously, returning a string like `"<strong>...</strong>"` would be interpreted as HTML and rendered. In v6, all strings are escaped for safety, and only React elements are rendered as markup. As a result, the `PagingInfoView` component which uses, `<FormattedMessage>`, was displaying `<strong>` tags as plain text instead of styled markup on the Docs Explorer page. This has been fixed by updating the strong property in `<FormattedMessage>` to return a React element. **Before** <img width="600" alt="Screenshot 2025-09-04 at 18 19 21" src="https://github.com/user-attachments/assets/b0024691-753c-47ab-8d5c-92e9e06d96a6" /> **After** <img width="600" alt="Screenshot 2025-09-04 at 18 27 04" src="https://github.com/user-attachments/assets/63de1c5e-e129-4dd0-9f79-3537196c3a4c" /> ### Checklist Check the PR satisfies following conditions. Reviewers should verify this PR satisfies this list as well. - [ ] ~Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)~ - [ ] ~[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials~ - [ ] ~[Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios~ - [ ] ~If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the [docker list]~(https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker) - [ ] ~This was checked for breaking HTTP API changes, and any breaking changes have been approved by the breaking-change committee. The `release_note:breaking` label should be applied in these situations.~ - [ ] ~[Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed~ - [x] The PR description includes the appropriate Release Notes section, and the correct `release_note:*` label is applied per the [guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) - [x] Review the [backport guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing) and apply applicable `backport:*` labels. ## Release note Fixes the Docs Explorer paging info to correctly render bold text. After upgrading to react-intl@6.6.6, the `<FormattedMessage>` component escaped HTML returned from value formatters, causing `<strong>` tags to appear as plain text. The component now uses React elements to render the bold text properly.
Summary
After upgrading to react-intl@6.6.6,
<FormattedMessage>no longer renders raw HTML when returning strings from value formatters. Previously, returning a string like"<strong>...</strong>"would be interpreted as HTML and rendered. In v6, all strings are escaped for safety, and only React elements are rendered as markup.As a result, the
PagingInfoViewcomponent which uses,<FormattedMessage>, was displaying<strong>tags as plain text instead of styled markup on the Docs Explorer page. This has been fixed by updating the strong property in<FormattedMessage>to return a React element.Before
After
Checklist
Check the PR satisfies following conditions.
Reviewers should verify this PR satisfies this list as well.
Any text added follows EUI's writing guidelines, uses sentence case text and includes i18n supportDocumentation was added for features that require explanation or tutorialsUnit or functional tests were updated or added to match the most common scenariosIf a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the [docker list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)This was checked for breaking HTTP API changes, and any breaking changes have been approved by the breaking-change committee. Therelease_note:breakinglabel should be applied in these situations.Flaky Test Runner was used on any tests changedrelease_note:*label is applied per the guidelinesbackport:*labels.Release note
Fixes the Docs Explorer paging info to correctly render bold text. After upgrading to react-intl@6.6.6, the
<FormattedMessage>component escaped HTML returned from value formatters, causing<strong>tags to appear as plain text. The component now uses React elements to render the bold text properly.