---
title: "Functions Keep HTML Entities (What’s New in PRO 2.1.18)"
url: "https://wpimportexport.com/function-entities-import-export-pro-2-1-18/"
description: "PRO 2.1.18 keeps HTML entities such as in the code of saved custom functions, so a saved function works like its test."
type: post
published: 2026-11-11T12:18:08+00:00
modified: 2026-11-11T13:45:31+00:00
categories: ["Product Updates"]
tags: ["Import Export by RockStarLab"]
---

# Functions Keep HTML Entities (What’s New in PRO 2.1.18)

Import Export by RockStarLab PRO 2.1.18 fixes how custom functions are saved, so a saved function gives the same result as the Test button.

**PRO:** the fix is in PRO. **Free:** no change; use it with Import Export by RockStarLab 2.1.61.

## HTML entities in function code stay as written

Custom functions in **Import Export → Functions** often work on HTML. A function that removes empty paragraphs looks for `<p>&nbsp;</p>`, and one that tidies text may look for `&amp;`. Before PRO 2.1.18, saving such a function turned `&nbsp;` in its code into a non-breaking space character. The Test button used the code as typed, but the saved function looked for something else, so in our test the empty paragraphs with `&nbsp;` stayed after a Content Updater run.

![New Function window with code that removes empty paragraphs containing &nbsp;, tested on pasted Word HTML](https://wpimportexport.com/wp-content/uploads/2026/11/01-function-with-nbsp-scaled.webp)

_A function with &nbsp; in its code now works the same after saving._

From PRO 2.1.18, the code is saved exactly as you type it. Code that arrives HTML-escaped as a whole is still decoded as before.

## What to do after the update

Open the functions that contain HTML entities such as `&nbsp;`, `&amp;` or `&#160;` in their code, paste the code again and click **Save Function**. Functions without entities don’t need anything.

## How to update

Update PRO from **Dashboard → Updates**. Functions, settings, jobs and schedules stay as they are. As before any update, [back up the site](https://wpimportexport.com/how-to-create-a-wordpress-website-backup-and-restore-it/) first.

## With an AI agent

An AI agent connected through the WordPress MCP Adapter (see [connecting Claude Code to WordPress](https://wpimportexport.com/connect-claude-code-to-wordpress-mcp/)) can read a saved function to check its code:

```
Show the code of the function "Clean pasted Word and Google Docs HTML".
```

In our run on PRO 2.1.18, the agent called `rsl-ie-pro/function-get` and the saved code contained `&nbsp;` as written.

## FAQ

### Which functions were affected?

Only functions whose code contains HTML entities, usually inside strings or patterns.

### Do library snippets change?

No. The built-in library is not affected.

### Do I need to update the free plugin?

No. PRO 2.1.18 works with Import Export by RockStarLab 2.1.61.

## Related Guides

- [Admin Colors, Row Filter and Day-First Dates (What’s New in 2.2.0)](https://wpimportexport.com/admin-colors-row-filter-import-export-by-rockstarlab-2-2-0/)
- [Coupon Usage in the Export (What’s New in 2.1.61)](https://wpimportexport.com/coupon-usage-export-import-export-by-rockstarlab-2-1-61/)
- [WordPress Import and Export Transformation Functions](https://wpimportexport.com/content-transformation-functions-for-wordpress-import-and-export/)

Get the free plugin on [WordPress.org](https://wordpress.org/plugins/import-export-by-rockstarlab/).
