Home
Analytics
HTML opening tags are converted to <
donpabloescobar
<p>I'm having a problem that I haven't been able to figure out or find a solution for after several hours. I have a table where one of the cells is a text box. The value displayed in the text box can be a list/array. I can populate the textbox with the array values but when I try to put in an HTML BR tag, the opening < gets replaced with < and the rendering fails. Oddly enough, the closing > does not get converted. This happens with any type of HTML tag as I have also tried DIV, LI, and P. The result is the same. I have also tried \r\n and generating the report as PDF. Still no linebreak.</p>
<p> </p>
<p>Here is the VALUE-OF code for the text box. The "phones" field is a list of phone numbers without formatting. The code adds the formatting then appends a BR tag.</p>
<pre class="_prettyXprint _lang-nocode">
<VALUE-OF>
var phones='';
if(row["phones"] !== null) {
var list = row["phones"].split(',');
for(var i=0; i < list.length;i++) {
if(list[i] !== null) {
var p = list[i].split(';');
phones += p[0].substring(0,3) + "-" + p[0].substring(3,6) + "-" + p[0].substring(6,10);
phones += "<br/>";
}
}
}
phones
</VALUE-OF>
</pre>
<p>Here is the resultant output:</p>
<pre class="_prettyXprint _lang-nocode">
123-456-7890<br/>555-555-1212<br/>987-654-3210<br/>
</pre>
<p>I have ensured that the format for the textbox is set to HTML and that it is set for Dyanmic Text.</p>
<p> </p>
<p>Similar to this, if a field contains HTML-formatted text (e.g. it has bold or italic tags, such as those that an enhanced textarea HTML control would use), those tags are also converted to < replacing the "<" character.</p>
<pre class="_prettyXprint _lang-nocode">
<div class="style_10" style=" overflow:hidden;"><span style="font-style: normal; font-weight: normal;">This is the </span><b style="font-style: normal;">description</b><div><b><i><u>of the loss</u></i></b></div></div>
</pre>
<p>What am I overlooking? Is there a better way to go about this?</p>
<p> </p>
<p>Thanks!</p>
<p> </p>
<p>Don</p>
Find more posts tagged with
Comments
donpabloescobar
<p>I figured out the way around this is to use the attribute <strong>format="HTML"</strong> in the VALUE-OF tag. Is that still the correct way to do this?</p>