Author Topic: <br /> added in description with html  (Read 7459 times)

0 Members and 1 Guest are viewing this topic.

Offline bigwave

  • Newbie
  • *
  • Posts: 35
  • stuck on the North Shore of Maui
    • View Profile
    • Maui Tropica
<br /> added in description with html
« 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

Offline honda2000

  • 4images Guru
  • *******
  • Posts: 3.263
    • View Profile
    • Wir machen Internet!
Re: <br /> added in description with html
« Reply #1 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/>!

Offline bigwave

  • Newbie
  • *
  • Posts: 35
  • stuck on the North Shore of Maui
    • View Profile
    • Maui Tropica
Re: <br /> added in description with html
« Reply #2 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

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: <br /> added in description with html
« Reply #3 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));
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline bigwave

  • Newbie
  • *
  • Posts: 35
  • stuck on the North Shore of Maui
    • View Profile
    • Maui Tropica
Re: <br /> added in description with html
« Reply #4 on: September 03, 2006, 08:23:23 AM »
That was It!  Got what I wanted.  Thanks again Mr. V@no!

Brian