4images Forum & Community
4images Issues / Ausgaben => Discussion & Troubleshooting => Topic started by: comicart on September 13, 2006, 01:08:58 PM
-
Since upgrading to 1.7.3 I see a problem with my Category descriptions.
If my description contains HTML, 4Images adds extra HTML tags!
For example - here is the description for one category:
<b>Fake Category Title</b><br>For more info visit the official website:<br><a href="http://fake_category.com/" target="_blank">http://fake_category.com/</a>
And here's how the code appears on the page:
<b>Fake Category Title</b><br>For more info visit the official website:<br><a href="http://fake_category.com/" target="_blank"><a href="http://fake_category.com/" target="_blank" rel="nofollow">http://fake_category.com/</a></a>
See how it *doubled* my a href link and closing "a" tag, plus added the "nofollow" to the link?
Is there a fix for this?
T
-
in includes/functions.php find:
$text = replace_url($text);
Insert above: if (!$html)
-
Perfect! Thank you!
Terry
-
Any way to get rid of the extra line breaks that show when there is a "return" in the HTML?
I've found that my "pretty" HTML is getting extra line breaks from 4Images.
For example:
<p>Some Sample</p>
<ul>
<li type="circle">Item 1</li>
<li type="circle">Item 2</li>
</ul>
Becomes:
<p>Some Sample</p><br />
<ul><br />
<li type="circle">Item 1</li><br />
<li type="circle">Item 2</li><br />
</ul>
T
-
Ok, replace entire block:
if ($html !== 2) {
$text = nl2br(trim($text));
$text = replace_url($text);
}
With: if (!$html) {
$text = nl2br(trim($text));
$text = replace_url($text);
}
-
*Perfect* - thanks!
T
-
One problem! :)
Doing this seems to have nixed the format of the Image Description on the Details pages also!
Can Categories and Image Description have different url and line break handling (like in earier versions)?
Terry
-
Ok, let me explain how it works.
If you want to use HTML you'll have to use <br> instead of newlines, there is no other way.
-
Ok, let me explain how it works.
If you want to use HTML you'll have to use <br> instead of newlines, there is no other way.
In 1.7 to 1.7.2 Categories and Image descriptions were handled differently.
I could put "pretty" HTML in the Category descriptions with no issues *and* use hard returns as breaks and simple URLs for links in the Description.
That's why I asked.
I guess that changed in 1.7.3?
Terry