Project

General

Profile

Actions

Bug #1996

closed

carriage returns in text area when tab display as click overlib errors

Added by krileon about 14 years ago. Updated almost 14 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
Start date:
21 September 2010
Due date:
% Done:

100%

Estimated time:
0:30 h

Description

When adding a carriage return to a text area field and the tab it is on is set to be a click overlib it will generate a fatal js error resulting in the overlib failing.

http://www.joomlapolis.com/component/option,com_joomlaboard/Itemid,38/func,view/catid,130/id,142559/#142559

Actions #1

Updated by scharles about 14 years ago

I have fixed this problem in my code base. I will attempt to post the correction in the bug ticket as wel.

The problem is in the \components\com_comprofiler\plugin\user\plug_cbcore\cb.core.php file.

Line 101 reads:

return str_replace( "\n", '<br />', parent::getField( $field, $user, $output, $reason, $list_compare_types ) );

It should read:

return str_replace( '\n', '<br />', parent::getField( $field, $user, $output, $reason, $list_compare_types ) );

The quotes around the \n should be single quotes not double quotes.

Steve

Actions #2

Updated by scharles about 14 years ago

Actually this is better... add the nl2br function to the line as well:

return nl2br(str_replace( '\n', '<br />', parent::getField( $field, $user, $output, $reason, $list_compare_types ) ));
Actions #3

Updated by beat almost 14 years ago

  • Assignee set to beat
  • Target version set to CB 1.3
  • % Done changed from 0 to 100
  • Estimated time set to 0:30 h

Fixed differently in r1295 .

Actions #4

Updated by beat almost 14 years ago

  • Status changed from New to Closed

Tested too. Closing.

Actions

Also available in: Atom PDF