# Proofread text inserts the text twice

**URL:** <https://meta.discourse.org/t/proofread-text-inserts-the-text-twice/339248>\
**Category:** Bug\
**Tags:** ai, ai-helper\
**Created:** [November 29, 2024, 9:42am UTC](https://meta.discourse.org/t/proofread-text-inserts-the-text-twice/339248 "2024-11-29T09:42:26Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

**Author:** ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)\
**Post date:** [December 3, 2024, 4:34am UTC](https://meta.discourse.org/t/proofread-text-inserts-the-text-twice/339248/8 "2024-12-03T04:34:53Z")

</div>

This will fix the core of the regression:

[https://github.com/discourse/discourse-ai/pull/993](https://github.com/discourse/discourse-ai/pull/993)

It comes though we a side effect @Jagster , we stopped sending English examples a while back, now we will be sending them again. Let us know if this impacts you.

That said @Roman this does not make sense to me:

```plaintext
SANITIZE_REGEX_STR =
            %w[term context topic replyTo input output result]
              .map { |tag| "<#{tag}>\\n?|\\n?</#{tag}>" }
              .join("|")
          

```

Should it not be:

(item is for title suggestions, but maybe its taking a different path)

```plaintext
SANITIZE_REGEX_STR =
            %w[output item]
              .map { |tag| "<#{tag}>\\n?|\\n?</#{tag}>" }
              .join("|")

```

---

_[View the full topic](https://meta.discourse.org/t/proofread-text-inserts-the-text-twice/339248)._
