The following example uses a Switch statement to evaluate whether the body of a field has rich text formatting. If rich text is applied, then hyperlinks are automatically generated without encoding; otherwise, hyperlinks are encoded.