---
updatedAt: 2026-04-16T23:08:30.000Z
agentTools:
  projectIndex: https://snipe-it.readme.io/llms.txt
---

# Fix Double-Escaped Text

In some circumstances, older data may have been escaped on the way into the Snipe-IT database, which means instead of seeing an apostrophe, you might see `Snipe&#39;s Laptop`, or `13-&#34; MacBook Pro`, etc. That shouldn't be happening with any newer data, but if you had older data that was affected, you can run:

```
# Fix double-escaped text
$ php artisan snipeit:unescape
```

All this command line tool does is search for any `name` entity with an ampersand in it, then walks through the results and tries to decode them and save them, which can save a lot of time with larger datasets.

```php
foreach($classname::where("$field",'LIKE','%&%')->get() as $row) {
   $this->info('Updating '.$field.' for '.$classname);
   $row->{$field} = html_entity_decode($row->{$field},ENT_QUOTES);
   $row->save();
   $count[$classname][$field]++;
 }
```

<br />