So basically I've installed K2 on a Joomla! based website and I have IntroText turned on for category views. There is a Master category, Master, of which all other categories are subcategories, which is how you have to apply IntroText to multiple categories because K2 is finicky - set all the options you want in the Master category and call them from the subcategories.
My particular problem is with losing HTML formatting in IntroText, so all blog posts would look like a brick of text (red lines denote where a paragraph should start, i.e. the <p>
tag):
It should look like the following:
I have tried changing pretty much every setting in the Category View option in the Master category to no avail, as the page the IntroText on is a K2 Category page. I have also tried turning ON HTML formatting (it is off by default) and then excluding the p
and br
tags from being removed, to no avail.
After some Googling, I couldn't find an answer, but I will admit there were one or two I didn't try (mainly modding the PHP files, I would have tried if the answer actually had some feedback). So, if anyone has any suggestions or ideas, let me know please, I would appreciate it. I can provide more details if needed, but for the time being the site is offline. If you would like some more clarification on the website set up I can oblige, but I believe I've added all relevant K2 details that I could.
EDIT: I have also tried commenting out these lines in /~siteDir~/public_html/modules/mod_articles_category/helper.php
to fix the issue, which also didn't work.
$introtext = str_replace('<p>', ' ', $introtext);
$introtext = str_replace('</p>', ' ', $introtext);
$introtext = strip_tags($introtext, '<a><em><strong>');
EDIT2: I tried to just remove the whole _cleanIntrotext
function and the call for it, $item->introtext = self::_cleanIntrotext($item->introtext);
, but this also didn't work... which means something somewhere else is stripping the IntroText too?