45.11 ESCAPE Function

This function is used when the standard attribute "Has Escape Output Attribute" option is enabled for an item type plug-in which enables a developer to choose whether to escape the output.

Syntax

APEX_PLUGIN_UTIL.ESCAPE (
    p_value     IN VARCHAR2,
    p_escape    IN BOOLEAN )
RETURN VARCHAR2;

Parameters

Parameter Description
p_value This is the value you want to escape depending on the p_escape parameter.
p_escape If TRUE, the return value is escaped. If FALSE, the value is not escaped.

Example

This example outputs all values of the array l_display_value_list as a HTML list and escapes the value of the array depending on the setting the developer chose when using the plug-in.

FOR i IN 1 .. l_display_value_list.count
LOOP
    sys.htp.prn (
        '<li>'||
        apex_plugin_util.escape (
            p_value  => l_display_value_list(i),
            p_escape => p_item.escape_output )||
        '</li>' );
END LOOP;