Skip Navigation
Expand
Right side of {‌some.text} is removed from content
Answer ID 10987   |   Last Review Date 07/24/2019

Why is article text of the format {‌some.text} being saved as {‌some}?

Environment:

Oracle B2C Service Knowledge Advanced Authoring (any version)

Issue:

A string {‌like.this} (a left curly brace, some letters, a period, some more letters, and a right curly brace) has the period and subsequent letters stripped when saving an article.

Say you wanted to include the following example code in an article:

// A valid R script
foo.bar <- "baz"
(x <- {‌foo.bar})

// sample output
// [1] "baz"
 

The portion {‌foo.bar} would be truncated to {‌foo}.

Resolution:

In Knowledge Advanced, a string {like.this} is interpreted as a reference to the replacement token with reference key (refkey) "like". Replacement tokens are localized so that the same token reference can be used in multiple locales. A replacement token can be referenced as either {‌refkey} or {‌refkey.localecode}. Any strings that look like one of those examples (say, matching something like the regular expression /\{[\p{‌L}_]+(\.[\p{‌L}_]+){0,1}\}/ ) are interpreted as token references. If the token or locale code does not exist, the locale reference is stripped on saving.

If your intent is not to have the string interpreted as a token reference, you could add whitespace (if appropriate) or a nonprinted character within the braces. For example, editing in source mode, find the text {‌foo.bar} . Change it to {‌&zwnj;foo.bar} . The zero-width non-joiner character would not affect any rendering at that position since a leading glyph would not be joined to a curly brace anyway. For a plaintext field, you could paste such a character from another source, although it would have to pass your configured security regex for that field.

In the case that you wanted to display a regular expression in an answer and it contained a character group like \p{‌L} (as above), upon saving you'll notice that the {‌L} is highlighted in red. Clicking on that will allow you to create a replacement token with that reference key ("L"); set the replacement text to be plaintext {‌L} and from then on your {‌L} will be replaced with {‌L} and you won't see the warning.

For more information on replacement tokens, consult the Documentation for Knowledge Advanced for your version. There, go to the Online Help and navigate to Managing Content Types > About Tokens, or search for "tokens".

Available Languages for this Answer:

Notify Me
The page will refresh upon submission. Any pending input will be lost.