Class IcalEscaper


  • public final class IcalEscaper
    extends Object
    Method for escaping text inside ICAL files.
    Since:
    7.0.0
    Author:
    XIMA MEDIA GmbH
    • Method Detail

      • escapeForPropertyValue

        public static String escapeForPropertyValue​(String text)
        Escapes an ICAL parameter value according to the ^-escaping mechanism defined by RFC 6868. The ^-escaping mechanism can be used when the value is either unquoted or quoted (i.e., whether or not the value is surrounded by double- quotes).

        Note: The special characters comma (,), semicolon ; and colon (:) do not have such an escaping mechanism -- text containing these characters MUST be surrounded with double quotes (RFC 5545 Section 3.2).

        Parameters:
        text - Text to be escaped. null is treated as the empty string.
        Returns:
        The text, escaped according to RFC 6868.