> ## Documentation Index
> Fetch the complete documentation index at: https://docs.abbyy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create the general functions

> Add the shared unescapeHTML function to your Pega library so HTML entity codes in FlexiCapture error messages display as readable Unicode characters.

Both the single-document and the multi-document scenarios need this shared function. Create it as described in [Create a function](/flexi-capture/connectors/pega/pega-installation-3#func).

## unescapeHTML

The `unescapeHTML` function converts HTML codes into Unicode characters, which is what makes error messages display correctly.

### Parameters

| Name         | Java type | Description          |
| ------------ | --------- | -------------------- |
| `htmlString` | `String`  | String of HTML codes |

### Return value

`String`, a string of Unicode characters.

### Exceptions

Leave the **Exceptions thrown** field blank.

### Java source

```java theme={null}
//Unescapes a string containing entity escapes to a string containing the actual Unicode characters
//corresponding to the escapes. Supports HTML 4.0 entities. 
return StringEscapeUtils.unescapeHtml4(htmlString);
```
