Skip Navigation
Expand
  • Advanced SearchOpens new dialog
    Enter plus (+) or minus (-) signs in search terms to make a word required or excluded
    Search Tips
    Filter by product
    Filter by category
HTML entities for special characters in plain text fields are not parsed
Answer ID 9229   |   Last Review Date 12/24/2018

Why are special characters encoded as HTML entities appearing as the source, such as &?

Environment:

Knowledge Advanced (all versions)

Issue:

Special characters are being seen in search results or elsewhere as HTML entities rather than the desired character.

Resolution:

HTML entities -- such as "&" for "&" and "é" for "é", are not parsed when included in plain text fields. These characters should be entered normally when creating or editing content.

The Knowledge Advanced REST API will not do any kind of parsing of these values, as a security precaution against execution of arbitrary code. Prior to importing articles containing special characters, care should be taken to convert any outstanding characters encoded this way to the native encoding of the import request. For example, PHP has the base function html_entity_decode which may be useful in preparing content for import.

A regular expression that may be helpful in identifying where these characters exist is: &[^\s]*;