# \<span class="search-highlight"\> showing up in search results

**URL:** <https://meta.discourse.org/t/span-class-search-highlight-showing-up-in-search-results/286847>\
**Category:** Bug\
**Created:** [November 28, 2023, 3:27pm UTC](https://meta.discourse.org/t/span-class-search-highlight-showing-up-in-search-results/286847 "2023-11-28T15:27:26Z")\
**Posts on this page:** 4\
**Page:** 1

## AI-generated summary

A bug report was filed regarding the `<span class="search-highlight">` tag appearing in search results, suggesting that the HTML is not being escaped as intended [mbauman](/t/-/286847/1). [isaac](/t/-/286847/4) acknowledged the issue, noting that he had temporarily enabled an upgraded search menu setting and would address the bug before re-enabling it. The issue is resolved via pull request [#24608](https://github.com/discourse/discourse/pull/24608) [isaac](/t/-/286847/5).

<div class="post-metadata">

**Author:** ![mbauman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mbauman/32/139835_2.png) [@mbauman](https://meta.discourse.org/u/mbauman)\
**Post date:** [November 28, 2023, 3:27pm UTC](https://meta.discourse.org/t/span-class-search-highlight-showing-up-in-search-results/286847/1 "2023-11-28T15:27:26Z")

</div>

Seems like this HTML isn’t intended to be escaped here:

 ![image](https://global.discourse-cdn.com/meta/original/4X/9/4/9/9499af5d2c77f1e0930e7b673a5243a625af9460.png)

---

<div class="post-metadata">

**Author:** ![isaac](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/isaac/32/235758_2.png) [@isaac](https://meta.discourse.org/u/isaac)\
**Post date:** [November 28, 2023, 3:43pm UTC](https://meta.discourse.org/t/span-class-search-highlight-showing-up-in-search-results/286847/4 "2023-11-28T15:43:50Z")

</div>

Thanks for the report, I quickly enabled (and then disabled) a site setting that enables an upgraded search menu. I will take a look at getting this fixed prior to re-enabling it.

---

<div class="post-metadata">

**Author:** ![isaac](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/isaac/32/235758_2.png) [@isaac](https://meta.discourse.org/u/isaac)\
**Post date:** [November 28, 2023, 9:59pm UTC](https://meta.discourse.org/t/span-class-search-highlight-showing-up-in-search-results/286847/5 "2023-11-28T21:59:55Z")

</div>

This will be fixed by

[https://github.com/discourse/discourse/pull/24608](https://github.com/discourse/discourse/pull/24608)

---

<div class="post-metadata">

**Author:** ![david](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/david/32/157490_2.png) [@david](https://meta.discourse.org/u/david)\
**Post date:** [November 29, 2023, 8:00am UTC](https://meta.discourse.org/t/span-class-search-highlight-showing-up-in-search-results/286847/6 "2023-11-29T08:00:33Z")

</div>

Closed on November 29, 2023, 8:00am UTC

This topic was automatically closed after 9 hours. New replies are no longer allowed.
