Skip to content

Main content

iCalendar Text Value Escaper

Escape iCalendar TEXT backslash, comma, semicolon and newline; lone CR is rejected, no colon or parameter encoding.

Loading tool…

Description

Escape iCalendar TEXT backslash, comma, semicolon and newline; lone CR is rejected, no colon or parameter encoding.

iCalendar separates content-line framing, property values, parameters and component nesting. TEXT escaping protects separators, while line folding is based on encoded octets. DATE, floating time, UTC and named-zone representations carry different information; a token-level operation does not resolve a timezone or expand recurrence rules.1

Escape iCalendar TEXT backslash, comma, semicolon and newline; lone CR is rejected, no colon or parameter encoding.

When to use this tool

Use this tool to escape iCalendar TEXT backslash, comma, semicolon and newline; lone CR is rejected, no colon or parameter encoding.

How to use the tool and how it works

  1. Enter text using the field definitions below.
  2. Run the operation. Correct input errors before interpreting an output.
  3. Read result.escaped. Use the ordering, boundary rules and absence conditions described below.

Escape backslashes first, convert LF or CRLF into a backslash-n marker, and escape semicolons and commas.2

Input fieldMeaning and unitsAccepted input
textTEXT-value or folded-content text under the stated operation; JSON escapes show actual backslashes and line endings.Text, at most 8,192 UTF-16 code units; the operation’s grammar also applies.
Output fieldInterpretation
resultObject containing the named fields below.
result.escapedEncoded iCalendar TEXT value.
json
{
  "input": {
    "text": "a,b;c\nx"
  },
  "output": {
    "result": {
      "escaped": "a\\,b\\;c\\nx"
    }
  }
}

Limitations and assumptions

  • A lone CR is rejected; the result is a TEXT value rather than a folded content line.
  • Content spans use zero-based UTF-16 offsets; fold limits use UTF-8 bytes including the continuation space. Token helpers handle the stated subset only, without a timezone database, recurrence engine or calendar import.
  • Every declared top-level input field is required and unexpected fields are rejected. Ordinary strings are limited to 8,192 UTF-16 code units and lists to 128 entries, with tighter operation-specific bounds where stated. JSON text has bounded nesting and node counts.
  • Numeric outputs must be finite and no larger in absolute magnitude than the safe-integer limit; operations returning exact large integers use decimal text. Positions are zero-based and spans end exclusively unless the operation explicitly states a different convention.

Alternative or Complementary methods

Keep content-line syntax, value escaping and timezone interpretation separate. Use a complete iCalendar implementation for recurrence expansion, timezone transitions and property-specific validation.

References

  1. RFC 5545: Internet Calendaring and Scheduling Core Object Specification — RFC Editor

  2. Tool behavior and example: iCalendar Text Value Escaper — tool.io

Similar or alternative tools

  • iCalendar Text List Value Joiner

    Format a literal iCalendar TEXT-list with per-value escaping, preserving empty elements and source order; no property-specific semantics.

  • iCalendar Text List Value Splitter

    Split an iCalendar TEXT-list only at unescaped commas, then decode defined TEXT escapes; repeated empty elements remain explicit.