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

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



Champion, thanks Brad!



<style> p.my_br { margin: 0px; }</style>


<p class="my_br">Line 1</p>


<p class="my_br">Line 2</p>


<p class="my_br">Line 3</p>


DrewW
Mega Sage
Mega Sage

Don't ask me why but this fixes the issue.



${AMP}lt;br/>


wollman1
Mega Contributor

I tried this, but on my UI page it processes after the HTML. In other it shows up as text on the website, Because you are creating an HTML Entity, rather than code.


I've used that in all kinds of places to prevent duplicate BR's, even in the middle of a while like you are using.   I do not use $[AMP]lt;br/>, so its always done in Level 1, not level 2.