Application Development Blog Posts
Learn and share on deeper, cross technology development topics such as integration and connectivity, automation, cloud extensibility, developing at scale, and security.
cancel
Showing results for 
Search instead for 
Did you mean: 
Former Member

I want to mention the nice feature of escaping string characters in ABAP. There is predefined function escape available with all options (HTML, XML, JS, JSON, XSS, URI, etc.) when you are using SAP_BASIS >= 731.

Function definition

Calling of the function is in this format:

escaped_string = escape( val = unescaped_string format = format )

Use cases

There are several use cases when you can use it such as:

  • Encoding URL / URIs
  • Escaping XML / HTML content, even HTML with Javascript
  • Encoding file name in HTTP header response as described in my other blog post

Documentation

There are two nice documentation sites:

This escape function should provide complex way in order to escape everything. I hope you enjoy it.