Notifications

76 views

Description

If the HTML-type field is set to readonly (at dictionary level) and its value contains <body> tag , then the style of the <body> tag gets applied to the form's <body> tag 


Steps to Reproduce

1- Create/update an HTML-type field as readonly. i.e.
<instance-name>/sys_dictionary_list.do?sysparm_query=name%3Dkb_knowledge%5Eelement%3Dtext
2- Pick an existing record or create one. i.e. KB0000031
<instance-name>/nav_to.do?uri=kb_knowledge.do?sys_id=409de43187032100deddb882a2e3ecd9
3- Go to System Definition > Scripts - Background. Modify accordingly and run the script below ;
var gr = new GlideRecord('kb_knowledge');
gr.get('409de43187032100deddb882a2e3ecd9');
gr.text = '<!DOCTYPE html> <body style=\"background-color:rgb(69, 84, 100)\"> This is a text </body> ';
gr.update();
4- Go to the updated/created record.

Actual behavior: Form background color can be seen as rgb(69, 84, 100)
Expected behavior: Form background color is displayed as system-default. HTML-type field can be seen as rgb(69, 84, 100)

Workaround

Remove the readonly setting from the dictionary level. Add a UI Policy, in which the necessary field will be set as readonly.


Related Problem: PRB1301812

Seen In

There is no data to report.

Associated Community Threads

There is no data to report.

Article Information

Last Updated:2018-09-12 16:43:38
Published:2018-08-31