<p>Neither <code>&lt;R&gt;</code> or <code>&lt;TM&gt;</code> are valid html elements so I'm not surprised that they are removed, Redactor is a rich text editor it expects html.</p>
<p>You could either replace the Redactor field with a plain text field if you want the output exactly as typed, or your client could simply use the correct html characters <code>&amp;reg;</code> and <code>&amp;trade;</code>.</p>

CC BY-SA 4.0
2023-02-23T14:35:49.347Z
2023-02-23T14:35:49.347Z
Seth
<p>This is a Craft 3.7.x install with Redactor.</p>
<p>My client is writing content referencing the proper usage of their trademarks. They'd like their content to state that it's permissible to use &quot;BRANDNAME <code>&lt;R&gt;</code> products&quot; or &quot;TRADEMARKED <code>&lt;TM&gt;</code> products&quot; in lieu of a proper ® or ™ symbol if needed. However, when typing these instructions into their redactor field, the <code>&lt;R&gt;</code> or <code>&lt;TM&gt;</code> is stripped from the output, even though the content (as shown in the code block below) is retained in the backend. While they've learned they can bypass it by inserting a space between the &quot;&lt;&quot; and the &quot;R&quot;, they can overcome the issue, it's not the desired behavior. In the control panel, the field content displays as such:</p>
<pre><code>BRAND &amp;lt; R &amp;gt; Products // using spaces, this will display
BRAND &amp;lt;R&amp;gt; Products // this will get stripped at output
</code></pre>
<p>I'm not sure whether the issue is with Redactor or Twig cleaning the text. I've disabled ALL cleaning/purifying of the Redactor field and am displaying the content with <code>{{entry.body|raw}}</code></p>
<p>Can someone please point me to the setting or filter that I am overlooking here?</p>
<p>Thanks</p>

<templating><redactor>
Redactor (or Twig?) Issue stripping <R> and <TM> strings
# Redactor (or Twig?) Issue stripping <R> and <TM> strings

(Asked by: username_0 on 2023-02-02)

This is a Craft 3.7.x install with Redactor.
My client is writing content referencing the proper usage of their trademarks. They'd like their content to state that it's permissible to use "BRANDNAME  products" or "TRADEMARKED  products" in lieu of a proper ® or ™ symbol if needed. However, when typing these instructions into their redactor field, the  or  is stripped from the output, even though the content (as shown in the code block below) is retained in the backend. While they've learned they can bypass it by inserting a space between the "<" and the "R", they can overcome the issue, it's not the desired behavior. In the control panel, the field content displays as such:
BRAND < R > Products // using spaces, this will display
BRAND <R> Products // this will get stripped at output

I'm not sure whether the issue is with Redactor or Twig cleaning the text. I've disabled ALL cleaning/purifying of the Redactor field and am displaying the content with {{entry.body|raw}}
Can someone please point me to the setting or filter that I am overlooking here?
Thanks

**Tags:** templating, redactor

---

## 1 answers

### Answer by username_1 on 2023-02-23. Score: 1

Neither  or  are valid html elements so I'm not surprised that they are removed, Redactor is a rich text editor it expects html.

You could either replace the Redactor field with a plain text field if you want the output exactly as typed, or your client could simply use the correct html characters `®` and `™`.


---

