4images Forum & Community

4images Issues / Ausgaben => Discussion & Troubleshooting => Topic started by: bigwave on September 02, 2006, 03:42:14 AM

Title: <br /> added in description with html
Post by: bigwave on September 02, 2006, 03:42:14 AM
Hello,

When I add html to the description box of an image each new line gets replaced by a <br /> such as:  <table><br /> <tr><br /><td> </td><br />.  The fix is to get rid of all the new lines before entering the code in the box but I was wondering if there is a way to switch this off  so there are no <br /> unless I put them in the code.

1.7.3

Thanx

Brian
Title: Re: <br /> added in description with html
Post by: honda2000 on September 02, 2006, 10:25:04 PM
If you fill the picture description and the input field catches fire is, does not press ENTER separate writes simply quite normally further. then it is also indicated on the issue nobody <br/>!
Title: Re: <br /> added in description with html
Post by: bigwave on September 03, 2006, 04:30:04 AM
Thanks for the advice--I'm not hitting enter keys--I'm doing development in a html editor and cutting and pasting the resulting tables into the image description box--some mechanism then puts <br /> after each html element (if it’s on its own line) which screws up the alignment--now I can (will have to for now) find replace all the newlines with a space so there is one big line but that is hard to edit later.  I was thinking that there was some programming mechanism which is inserting the <br />s which might be able to be turned off so I could keep a lucid html structure for me and others to edit later?

Thanks again,

Brian
Title: Re: <br /> added in description with html
Post by: V@no on September 03, 2006, 05:00:25 AM
Try this. In includes/functions.php find:
Code: [Select]
    $text = nl2br(trim($text));
Replace with:
Code: [Select]
    if ($html == 0) $text = nl2br(trim($text));
Title: Re: <br /> added in description with html
Post by: bigwave on September 03, 2006, 08:23:23 AM
That was It!  Got what I wanted.  Thanks again Mr. V@no!

Brian