HTML Help text

Brian Lancaster
Tera Sage

Does anybody know of a way to make it so that HTML shows in the help test now that ServiceNow is escaping it?   We obviously do not want to set glide.ui.escape_text to false.   Just wondering if there are any other workarounds before we have to upgrade to Fuji Patch 12 Hot fix 1.   We have tables setup to show what the different choices mean on a list collector.

37 REPLIES 37

venkatiyer1
Giga Guru

Perfect.


venkatiyer1
Giga Guru

Hi Brian/Ricky,



I am in Geneva/UI 16 and the help text html is different so if it is a div tag that is holding the help text with a class of sc-help-text in your current version you might have to use either one of the code below within onLoad catalog client script. I have removed the regex as it works fine without that piece of code itself. Check this piece if you face any issues.



Using Prototypejs framework



$$("div.sc-help-text").each(function(item){


var textValue = item.innerText;


$(item).update(textValue);


});




or using jquery


$j("div.sc-help-text" ).each(function(index) {


var html = $j(this).text();


$j(this).html(html);


});


Hi Venkat,



Both of these scripts working are working perfectly. I also work in Geneva.



Hi Brian,



I tried the script you posted above but it didn't work.



Thanks a lot both of you for helping me.


After Switching to Helsinki I had to switch to the code under Using Prototypejs framework.


jquery method works. Thanks!