4images Forum & Community

4images Issues / Ausgaben => Discussion & Troubleshooting => Topic started by: Sun Zaza on January 10, 2012, 12:08:05 PM

Title: Problem with the additional field "textarea" to go to a new line
Post by: Sun Zaza on January 10, 2012, 12:08:05 PM
Hi,

I have a problem with the additional field "textarea".

To go to a new line I have to use <br />. I don't have to do that in the image_description texterea.

How can I solve that? Maybe I changed something, but I cannot remember.

Thanks in advance for your help.
Cruxy
Title: Re: Problem with the additional field "textarea" to go to a new line
Post by: V@no on January 10, 2012, 01:17:13 PM
Check if your format_text function in functions.php is unchanged.
Title: Re: Problem with the additional field "textarea" to go to a new line
Post by: Sun Zaza on January 10, 2012, 01:29:21 PM
Hi V@no,

It is unchanged. This is the function on includes/functions.php:
function format_text($text, $html = 0, $word_wrap = 0, $bbcode = 0, $bbcode_img = 0) {

  if ($word_wrap && $text != "") {
    $text = preg_replace("/([^\n\r ?&\.\/<>\"\\-]{".$word_wrap."})/i", " \\1\n", $text);
  }

  if ($html == 0 || $html == 2) {
    $text = safe_htmlspecialchars($text);
  }

Very strange.

What about something in admin_functions?
Title: Re: Problem with the additional field "textarea" to go to a new line
Post by: Sun Zaza on November 28, 2012, 08:48:32 AM
I solved it with format_text().

Thank you