Notifications

74 views

 

Symptoms


HTML tags automatically added  when a knowledge article is saved

Release


Jakarta and later

Steps to reproduce


  1. Open/Create any form having an HTML field (ie  kb_knowledge.do)
  2. Paste the below code in the HTML field :
        <ul>
    <ul>
    <li>This is a test
    </li>
    </ul>
    </ul>
  3. Right click on the header and save the form. The content of the HTML is corrupt and the code gets converted to the below ( li tag gets added):
        <ul>
    <li>
    <ul>
    <li>This is a test
    </li>
    </ul>
    </li>
    </ul>

Cause


Starting in Jakarta, as a security measure, any HTML is passed through an HTML sanitizer prior to displaying. The sanitizer is less permissive with invalid HTML than may have been the case in prior releases. Look for invalid HTML such as unopened or unclosed tags within the HTML field and fix the content that generated it. 

Resolution



HTML sanitizer is trying to validate any content you use according to the W3C standards and this is an expected behavior. Make sure to use valid W3C HTML code. You can use a W3C validator to validate your code before submitting it.


 

Article Information

Last Updated:2018-09-03 06:07:20
Published:2018-09-03