Customization attribute "calculated value"(Scripted base on) for HTML tags
It has set a process for automatic input in the calculated value to the attributes of the HTML type.
HTML Tag from being displayed as it is as a string. I think there is no way to express in a state of being HTML encoded? example [WorkItem View before] BOLD TITLE -------------------------------------------- in Script GetValue = workitemattribute(attributeId); //⇒"<strong>bold title</strong> " return GetValue; -------------------------------------------- [WorkItem View after] <strong>bold title</strong> I think there is no way to avoid? Please,thanks |
Accepted answer
Ralph Schoon (63.3k●3●36●46)
| answered Mar 15 '16, 3:31 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
I have not found a way to pass the text data from JavaScript into an HTML attribute without the tag information being escaped out.
From an API perspective, the data in such an attribute is an XML String. You can construct it from plain text, which escapes all tag data or you can create it as XML which leaves the tag data. I haven't found a way to do the latter in JavaScript. I can only do this in Java API. Ralph Schoon selected this answer as the correct answer
Comments
HIROAKI JOSAKO
commented Mar 15 '16, 10:30 p.m.
Thanks Ralph
I know the Java API and that uses
|
One other answer
The results of the examination of this issue.
The last of the "return value" of the Script, we know is that it enables to some extent by changing. Use the "decoration string" function of Javascript to value. For example: value.bold (); value.italic (); Disassemble the Attribute value for each HTMLTags. "Value (i) <array>" and then consolidated with a Javascript function along to the tag. For example: return value (0) + value (1) .bold () + value (2) .italic (); view str0str1str2 Problem 1. It is an HTML document that has been freely written. Because there is a need to pack to decompose and sequence for each tag from the beginning, you need to write a recursive processing. 2. failure to create a variable linked to before the return. For example: temp = value (0) + value (1) .bold () + value (2) .italic (); return temp; View str0 <b> str1 </b> <i> str2 </i> In particular, "2." We believe that or not is impossible to solve. |
Your answer
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.