Jump to content

[Improvement] Company Address Accepts Line Breaks


Michael

Recommended Posts

New line is stored in db, so, where is necessary, it should use a simple nl2br() php method.

 

Where you think to use address in new way?

 

Thank you mate :) life saver.

<?php if( $system_company->address !='' ){ echo nl2br($this->Html->safe($this->Html->ifSet($system_company->address))); } ?>
Link to comment
Share on other sites

We don't show company address in the structure. I guess this is a custom change you've added? If so, then running it through nl2br wherever you're using it is the preferred solution. We wouldn't update the company address field to automatically display line breaks as HTML breaks otherwise.

Link to comment
Share on other sites

We don't show company address in the structure. I guess this is a custom change you've added? If so, then running it through nl2br wherever you're using it is the preferred solution. We wouldn't update the company address field to automatically display line breaks as HTML breaks otherwise.

 

Ah that's why :) nl2br works fine so perfect haha.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...