Page 1 of 1

Overlib adds extra line

Posted: 01 May 2016, 15:25
by Gruz
Phoca adds extra <br/> for overlib.
In components/com_phocagallery/views/category/view.html.php at lines
1345
and
1346
there is code

Code: Select all

$this->items[$iS]->description		= str_replace("\n", '<br />', $this->items[$iS]->description);
So if I have an HTML code in the description like this

Code: Select all

<p>Text line 1</p>
<p>Text line 2</p>
Then the code in overlib looks very bad

Code: Select all

<p>Text line 1</p><br/><p>Text line 2</p>
Extra line!

I suggest to add <br/ > only if there is not HTML in the description
Smth. like this

Code: Select all

if (strip_tags($this->items[$iS]->description) == $this->items[$iS]->description) {
	$this->items[$iS]->description		= str_replace("\n", '<br />', $this->items[$iS]->description);
}

Re: Overlib adds extra line

Posted: 01 May 2016, 22:56
by Jan
Hi, thank you for the info, I will take a look at it.

Jan

Re: Overlib adds extra line

Posted: 16 May 2016, 15:02
by Jan
Hi, set in version 4.3.0

Jan