When replicating Knowledge documents, you may find extra characters inserted into your document. This is because of how the data is stored in ServiceNow and serialized into XML. Since this data is being stored in HTML format, ServiceNow will replace spaces with: . These will not be properly serialized into XML and will result in additional characters in your document. In addition, ServiceNow will also use <p> </p> instead of <br/> to denote extra blank lines. However, these For example, the following document code would be displayed like so: 

As you can see, the code was not properly serialized in ServiceNow. To combat this, HTML field values will have to use base64encode and base64decode - this will allow the value to remain the same throughout. You can do this by changing the encryption mode to encrypted_multibyte. You can find instructions here. Note: With this, you do not need to use Before Share or Subscribe scripts to account for these characters. |