Line Breaks (<br/>) in UI Pages duplicating

wollman1
Mega Contributor

I'm trying to create a UI Page to display some information off the group form. However when I try to split a line using a <br/> tag, when it renders it is duplicated.

 

UI Page Code:

<j2:while test="$[groups.next()]">

  <tr>

      <td>$[groups.name]</td>

      <td>$[groups.u_escalation_on_call_contact]</td>

      <td>$[groups.manager.first_name] $[groups.manager.last_name]<br/>$[groups.manager.mobile_phone]</td>

      <td>$[groups.manager.manager.first_name] $[groups.manager.manager.last_name]<br/>$[groups.manager.manager.mobile_phone]</td>

  </tr>

</j2:while>

 

As Rendered:

<tr><td>Account &amp; Access Management</td><td>877-504-6342</td><td>Todd Sears<br></br>(617) 529-6965</td><td>Courtney Harwood<br></br>(617) 312-9865</td></tr>


How can I prevent this?

 

Thank you ahead of time

-Matt

1 ACCEPTED SOLUTION

Thanks Brad that worked, when I applied an element style of margin: 0px;



View solution in original post

13 REPLIES 13

wollman1
Mega Contributor

Drew, I wonder what's the difference.



I tried a new UI page with just the following code:


<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">


<p>This is a TEST${AMP}lt;br/>Hello World</p>


</j:jelly>


And it still displays as:




This is a TEST<br/>Hello World



Oh well! Using Brad Tilton's suggestion of a <p> tag and setting the margin:0; works just as well.



Thanks,
Matt


Interestingly I found the answer today on why they are different.   If the system property "glide.ui.escape_text" is false then the $[AMP]lt;br/> works, if it is true then it does not.


nj70
Kilo Contributor

Hi Michel,


I have the similar situation..


I am opening a dialog window from client script.


In the ui page I have used "${RP.getWindowProperties().get('comments_text')" to get the value from client script.



Now the Issue it is diaplaying <br> in the output instead of line breaking.



I have replaced the \n with <br> using


replace(/\n/g ,'$[AMP]lt;br/>')



also tried like replace(/\n/g ,'<br/>')



but same problem.



Do you have any idea on this.


Thanks


All you can do is use paragraph tags and then set the margin to zero, at least thats the best way I have found.