Hi, I'm Ask INFA!
What would you like to know?
ASK INFAPreview
Please to access Ask INFA.

Table of Contents

Search

  1. Preface
  2. Understanding Data Types and Field Properties
  3. Designing Processes
  4. Using and Displaying Data
  5. Designing Guides
  6. Designing Process Objects
  7. Designing Service Connectors
  8. Using App Connections
  9. System Services, Listeners and Connectors
  10. Designing Human Tasks

Design

Design

escape-html-uri

escape-html-uri

The escape-html-uri function in XQuery returns a string that is safe to use within HTML URIs by escaping characters that have a special meaning in HTML, such as
&
,
<
,
>
,
"
, and
'
with corresponding percent-encodings. This ensures the URI can be safely embedded in HTML attributes without breaking the markup.

Syntax

fn:escape-html-uri(uri)
The following table describes the argument for this command:
Argument
Required/Optional
Description
uri
Required
The URI string to be escaped for HTML usage.

Return Value

  • Returns a string with characters that are special in HTML URI contexts replaced by percent-encoded equivalents.
  • Ensures the URI string is safe for inclusion in HTML documents as part of a URI.

Examples

The following table lists some sample values and return values:
SAMPLE FUNCTION
OUTPUT
fn:escape-html-uri("foo<>\")
"foo%3C%3E%22"
fn:escape-html-uri("")
""

Additional information

  • The function is specifically designed to escape URIs within HTML contexts where certain characters need escaping to avoid breaking HTML syntax.
  • It only encodes characters that are significant in HTML URIs, different from general URI encoding.
  • Always returns an
    xs:string
    .

0 COMMENTS

We’d like to hear from you!