Knowledge Article Comment Widget

Brendan13
Tera Contributor

Hello All,

Posting a comment with the new knowledge article comment widget in the portal results in the kb_feedback comments field containing html tags around the comment text e.g. "Test" will show as "<p>Test</p>" in the comments field.

I understand that the widget is using a html text editor but is there a relatively easy way to not show the html tags in the comments field? Ideally an oob option but I'm guessing there is not such an option after the initial search I have done.

 

Regards,

Brendan

 

6 REPLIES 6

Alikutty A
Tera Sage

Hi Brendan, 

The HTML saved in the comments are used to render it back on the portal comments section. If you remove it then you would see it as plain text in the comments section. This to me is not ideally a good design as Comments is a String field and we generally use Comments in reporting.

find_real_file.png

 

Maybe, You can add a custom comments field on kb_feedback and copy the plain text portion of HTML comments into it and use it for reporting if that was your actual requirement.

Thanks!

Naveen20
ServiceNow Employee
ServiceNow Employee

This is happening

 

find_real_file.png

Mehdi Brahimi
Tera Contributor

Hello,

Anny update on this behavior ?? 

 

Hello, 

I do not think you have any OOTB support for removing these tags, so the comment in kb_feedback will have these tags if the feedback derives from the Portal Widget. 

You should be able to handle this with some customisations, eg. with a Business Rule on the feedback table, you could then handle the HTML tags with a Regex, something similar to this should work: <\/?[^>]+(>|$)