How Can I Replace Text Characters in RTC via Attribute Customization Javascript?
I am writing an attribute customization script in RTC to evaluate the contents of a Work Item's description field. I want to be able to do a compare on the text and disregard any HTML formatting that may be present. To do this, I am trying to perform a javascript replace function on the text string that I am evaluating. However, the replace function isn't working. It isn't causing an error, but it's not having any effect either.
Example:
Input:text = "<b>Solutions Considered:</b><br/>";
Replace command:
text = text.replace(/<b>|<\/b>|<i>|<\/i>|<br\/>/, "");
Expected result:
text = "Solutions Considered:"
Actual result:
text = "<b>Solutions Considered:</b><br/>";
I've tested this in a JavaScript editor and it produces the expected results there. Does RTC not support the JavaScript replace function? Do I need to specify a dojo.require command in order to have the replace work as expected?
P.S. Jazz.net, you guys really need to figure out how to allow me to display HTML tags without interpreting them as HTML.3 answers
Comments
Comments
I also encountered the same issue. I was auto-populating Description field based on value of an enumeration and was getting HTML value instead of text in Description field.
Comments
Ralph Schoon
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER Apr 08 '15, 3:01 a.m.