Back to blog
2 min read Product Updates

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
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 first.

With an AI agent

An AI agent connected through the WordPress MCP Adapter (see connecting Claude Code to WordPress) 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.

Get the free plugin on WordPress.org.

Dmitriy
About author

Dmitriy

WordPress Developer with 15+ years of commercial experience. Elite Author on ThemeForest and creator of custom WordPress plugins. Passionate about clean code, performance optimization, and building useful tools for the WordPress community.

JOIN THE CONVERSATION

Comments 0

Have a question or a tip to share? Leave it below.

Leave a comment

Your email address will not be published. Required fields are marked *

We store your name, email and comment to show and moderate it; your email is never published. Spam protection is provided by Cloudflare Turnstile and profile pictures by Gravatar. See our Privacy Policy.


Try the plugin with no risks!

New users get 1 month with access to all premium features. Experience the most powerful WordPress data engine today.

Download Now
Get PRO for FREE