webbrowser control strips "&" character when invoking fnAddData() inside explorer webbrowser control
webbrowser control strips "&" character when invoking fnAddData() inside explorer webbrowser control
craiggriffin
Posts: 12Questions: 0Answers: 0
Hi,
I'm using v1.9.4. When running the code in any browser, everything is fine, but when running the code inside our .net I.E. webbrowser control (versions 8, 9 or 10) the "&" character is being stripped inside fnAddData().
e.g.
// gItem[6] is equal to "P&G"
var lRowData = gTableInstanceList.fnAddData([gItem[0], gItem[1], gItem[2], gItem[3], gItem[4], gItem[5], gItem[6], gItem[7], gItem[8], gItem[9], gItem[10], gItem[11], gItem[12]], redrawTable);
// The Cell for gItem,[6] displays "P" .
// "&G" is stripped. Only in webbrowser control. All other browsers display "P&G"
Has anyone else come across this ? Any suggestions ?
Thanks,
Craig.
I'm using v1.9.4. When running the code in any browser, everything is fine, but when running the code inside our .net I.E. webbrowser control (versions 8, 9 or 10) the "&" character is being stripped inside fnAddData().
e.g.
// gItem[6] is equal to "P&G"
var lRowData = gTableInstanceList.fnAddData([gItem[0], gItem[1], gItem[2], gItem[3], gItem[4], gItem[5], gItem[6], gItem[7], gItem[8], gItem[9], gItem[10], gItem[11], gItem[12]], redrawTable);
// The Cell for gItem,[6] displays "P" .
// "&G" is stripped. Only in webbrowser control. All other browsers display "P&G"
Has anyone else come across this ? Any suggestions ?
Thanks,
Craig.
This discussion has been closed.
Replies
Just prior to fnAddData():
if (!gStandalone) // inside webbrowser control
{
for (var h = 0, i = item.length; h < i; h++) {
// convert & to &
if (typeof(item[h]) != "string") continue ; // ignore non-string
item[h] = item[h].replaceAll("&" , "&");
}
}