Right panel is f*cked up

Topics: Themes
Aug 7, 2008 at 7:49 PM
Hi,

after clicking into a blog the hole right panel is bellow the message... Not cool, it wasen't that before i upgrade to the 1.4.0.0..
Don't understand what i mean? Visit my blog http://www.tcip.se/ click on any blog and you will see what i mean..

How do i fix it?
Aug 7, 2008 at 9:54 PM
Looks like its fixed, just test in firefox 2.0 and ie7 and I see no issues.. can you be more specific??
Aug 7, 2008 at 10:30 PM
Edited Aug 7, 2008 at 10:37 PM
There is an unclosed <span> in this post. It is in the related posts section, I don't have time right now to find the root of the problem, but I will try a little later.

Edit: Uhh... by "an unclosed <span>" I mean: his related posts section is totally jacked up, it looks like every related post entry is missing a </span>.

Edit (again): The root problem is: the stub in related post is not stripping html tags from the body text
Aug 8, 2008 at 7:58 AM
Edited Aug 8, 2008 at 8:12 AM
alexhiggins732
This post is the messed up one. I copy the hole HTML code into my local blog on my machine, I'm running 1.4.5.0 version on that one. And there is perfect no messed up css (or what it's called).
Aug 8, 2008 at 8:12 AM
Edited Aug 8, 2008 at 8:16 AM
joeflateau:
I search trow the document of any span tags, i can't found any one in that document. when i copy the hole HTML code in to my local machine it's not messing up the right side..
 
I don't know what "stub" is :$
Aug 8, 2008 at 2:04 PM
Here, this should make the problem clear:


<div id="relatedPosts">
<h1>Related posts</h1>
<div>
<a href="/post/2008/05/01/Sony-Ericsson-W810i.aspx">Sony Ericsson W810i</a>
<span>
<div>En jätte bra mobiltelefon som är späckad med allt du behöver; Wap, blueto...
</span>

<a href="/post/2008/05/21/Koss-Headset-SB45-med-mikrofon.aspx">Koss Headset SB45 med mikrofon</a>
<span>
<div><span class="sectionText"><span class="sectionText"><span class="sectionText">Jag köpte ...
</span>

<a href="/post/2008/04/29/Godgarning.aspx">Godgärning</a>
<span>
<div>Imorgon ska Sascha på begravning så jag fick ta ledigt så att någon k...
</span>
</div>
</div>
Aug 8, 2008 at 4:18 PM
Witch document should i edit? :$
Aug 20, 2008 at 12:49 PM
*bump*
Aug 20, 2008 at 9:31 PM
joeflateau already answered your question.  In the page that is messed up you have a series of unclosed <div> and <span> elements.  Judging by joe's post, it is in the related posts of that page.  You will have to edit the html to get it correct.

Probably your best bet is to delete the whole thing and type it in again.  Maybe then the editor with have the correct closings.
Aug 20, 2008 at 9:46 PM
I kind of answered the question. I answered the "what is happening", but not the "why is it happening".

I'm really not sure why the HTML tags aren't being stripped from the stub in the related posts section. But I will look into it further.
Aug 20, 2008 at 10:07 PM
Edited Aug 20, 2008 at 10:21 PM
It's got something to do with this line:

Search.AddItem(IPublishable item)
{

...

entry.Content = HttpUtility.HtmlDecode(CleanContent(item.Content, true));

...

}
I think this is happening: the < and > characters are being HtmlEncoded when they are posted. Then the content is Cleaned, but since it is HtmlEncoded the < and > characters are actually &lt; and &gt; so they are passed over by StripHtml, then when the Html is decoded the &lt; and &gt; are converted back to < and > we get this problem. Also, if you have &lt; or &gt; in your post (on purpose) this will change them to < or > which is not what should happen.

This might just be a problem with the order the methods are invoked. item.Content should be HtmlDecoded THEN Cleaned, not Cleaned then HtmlDecoded.

Aug 20, 2008 at 11:04 PM
In short for the non technical... the issue is coming from your related posts not putting out correct HTML. In your Settings, if  uncheck "Show Related Posts" the issue should go away.   I was trying to examine your "Perfect Post" for more info... But you seem to have a SQL DB Error