<p>I think the issue is that craft will sanitise (escape) any code before it goes into the database, to prevent any code injection and twig will also do the same at a template level (to prevent script injection).</p>

<p>If you have your entry title as <code>DIVA! Becomes Famous &amp;#8480</code> for example, it will appear like that in craft and in your templates, but if you do <code>{{ entry.title|raw }}</code> it will actually output ℠ in your template.</p>

<p>From the twig docs:</p>

<blockquote>
  <p>The raw filter marks the value as being "safe", which means that in an environment with automatic escaping enabled this variable will not be escaped if raw is the last filter applied to it</p>
</blockquote>

<p><a href="http://twig.sensiolabs.org/doc/filters/raw.html" rel="nofollow">See more in twig docs</a></p>

CC BY-SA 3.0
2015-06-20T20:06:41.587Z
2015-06-20T20:06:41.587Z
Alec Ritson
<p>Anyone have an idea on how to incorporate a service mark (SM) into the title of an entry? I've tried just doing <sup>SM</sup>, tried the code for SM &amp; # 8 4 8 0 ; (without the spaces), and nothing works. I even tried creating a new rich text field so I could do it there and have a conditional to show that field instead of the title field, but that makes it so that it can't be used in different headline tags on different pages, as its auto-enclosed into a pargraph or h3 or whatever. </p>

<p>Any thoughts or ideas are greatly appreciated!!</p>

<richtext><craft-pro>
Service Mark in title
# Service Mark in title

(Asked by: username_0 on 2015-06-20)

Anyone have an idea on how to incorporate a service mark (SM) into the title of an entry? I've tried just doing SM, tried the code for SM & # 8 4 8 0 ; (without the spaces), and nothing works. I even tried creating a new rich text field so I could do it there and have a conditional to show that field instead of the title field, but that makes it so that it can't be used in different headline tags on different pages, as its auto-enclosed into a pargraph or h3 or whatever.

Any thoughts or ideas are greatly appreciated!!

**Tags:** richtext, craft-pro


---

## 1 answers

### Answer by username_1 on 2015-06-20. Score: 2 | Accepted answer

I think the issue is that craft will sanitise (escape) any code before it goes into the database, to prevent any code injection and twig will also do the same at a template level (to prevent script injection).

If you have your entry title as `DIVA! Becomes Famous ℠` for example, it will appear like that in craft and in your templates, but if you do `{{ entry.title|raw }}` it will actually output ℠ in your template.

From the twig docs:

> The raw filter marks the value as being "safe", which means that in an environment with automatic escaping enabled this variable will not be escaped if raw is the last filter applied to it

[See more in twig docs](http://twig.sensiolabs.org/doc/filters/raw.html)


---

