OpenSLP Programmers Guide - SLPEscape()

## SLPEscape

### Declaration

`#include <slp.h>`

`SLPError SLPEscape( const char* unescaped,`
`char** escaped,`
`SLPBoolean istag )`

### Description

Process the input string to escape any SLP reserved characters. If the `istag` parameter is SLP_TRUE then SLPEscape() will look for bad tag characters.

### Parameters

`unescaped` | Pointer to the string to be escaped
escaped | Pointer to a pointer for the dynamically allocated output string. The memory should be freed by a call to SLPFree() when no longer needed.
istag | When SLP_TRUE the input buffer is checked for bad characters

### Returns

SLP_OK | Indicates that the no error occurred during the operation.
SLP_PARSE_ERROR | The API returns this error only when no information was retrieved, and at least one SA or DA indicated a protocol error. The data supplied through the API may be malformed or a may have been damaged in transit.
SLP_MEMORY_ALLOC_FAILED | Out of memory error
SLP_PARAMETER_BAD | If a parameter passed into a function is bad, this error is returned.

### Status

OpenSLP 0.6.7 | Fully implemented as specified by RFC 2614.

### See Also

SLPUnescape(), SLPFree()