Skip Navigation
Expand
Properly put < and > characters into the PlainText (and TextArea) attribute fields when editing/saving KA answers
Answer ID 12573   |   Last Review Date 03/01/2023

How to properly put < and > characters into the PlainText (and TextArea) attribute fields when editing/saving KA answers?

Environment:

Knowledge Advanced for Oracle B2C Service 

Resolution:

Unlike RichText attribute field (which we will automatically encode the <xxxx> tag when editing/saving KA answers), the < and > characters in <style>, <table>,<pdf>, <pdfset> strings will not be encoded (as &lt; and &gt; respectively) for PlainText (and TextArea) attribute field.  As a result, if the author put in those <xxxx> strings (like, <style>, <table>,<pdf>, <pdfset>, ...) at the PlainText (and TextArea) attribute field, the browser would mistakenly parse/process them as HTML tags then.  And it would lead to the 'broken' being rendered in Authoring UI (and Customer Portal UI) Content View page then.

Hence for the PlainText (and TextArea) attribute field, authors may want to avoid using <xxxx> strings.  If they have to use <xxxx> character strings, they should do the following:
1) manually encoded them.  ie,
- typing &lt; for < 
- typing &gt; for >
Or
2) Use the < > characters in a way that browser would not wrongly/mistakenly parse/process them as html tags.  Like, adding spaces around them.  For example,
- typing < style > instead of <style>
- typing < table > instead of <table>
- typing < pdf > instead of <pdf>
- typing < pdfset > instead of <pdfset>