Friday, January 09, 2009 | Register | Login 
Minimize
 Module Support Forums
 
 Forum Forum metaPost Forums metaPost Forums metaPost Featur... metaPost Featur... Bug? (rare, but sometimes truncated non-closing script tags) Bug? (rare, but sometimes truncated non-closing script tags)
Previous Previous
 
Next Next
New Post
 2/20/2008 1:30 AM
Sky
11 posts
No Ranking


Bug? (rare, but sometimes truncated non-closing script tags)
 

I think I've come across a bug (forgive me if its on my end and not yours) but the following happened:

Due to your new injection of "Powered by..." advertising, that DNN -- when trying to extract a summary from the post's top -- can inadvertently cut the img tag's contents in half -- causing non-closing tag, and a garbled page where SolPartMenu stops working, and the Right and Bottom zone never appear. A real little mess.

I had a garbled page, and when I looked at the source I found this:

<div class="d_itc_f" style="clear:both;height:11px;"><a class="a_itc" style="float: right;" href="http://www.itcrossing.com/"><img alt="powered by metaPost" style="border: none ;" src="/DesktopModules/itcMetaPost/images/m.gif"></a><script src="/DesktopMo ...</span>

As you can see, it's truncating in the script src and therefore the script tag is non-closing...

Maybe you can stick that line of advertising at the top of the text, and position it relatively, so that it can't be cut in half?

 

 

 
New Post
 2/20/2008 1:49 AM
Don Worthley
201 posts
9th Level Poster


Re: Bug? (rare, but sometimes truncated non-closing script tags)
 

Sky,

I'm sorry you've run into this.  I'll revisit the code, but I'm aware of this issue and wrote a routine to add spaces before the script tag so that this wouldn't happen.  It sounds like that code needs to be checked.  Basically, the code looks at the max summary for the module settings.

Of course, having this code doesn't protect against changing the max summary length later and thereby introducing a whole new set of truncated HTML tags.

Honestly, I really struggled with this while developing the Blog provider and there was no good solution.  The issue is that the summary shouldn't be truncated unless it's text.  This same issue will arise if regular content image tags are truncated.

What I have done on my blog is set the max summary value to the maximum value for an integer.  This solves the problem and also makes the blog look a little more like some of the more modern blogging platforms. 

I considered placing the attribution link at the top, but I've noticed that for those who use the blog to show an aggregated listing of multiple blog authors, the shortened summary is popular (DNN Blogs, for example).  This being the case, I didn't want to place the attribution div at the top of the page since it would be considered content by the blog module. 

I'll check the code again to make sure the anti-truncation logic is correct, and this will certainly help minimize the chances of this happening again, but until the blog module is updated, I'm afraid we'll have to live with some level of HTML truncation if we want to let the blog module automatically truncate our summaries.

One approach that would work well for teams of people all using metaPost would be to use the Extended Entry feature to provide a summary and actual post with each blog entry.  You would combine this with setting the max summary to a high number.  Of course, the obvious disadvantage here is that you're left to the content provider's judgement regarding the length of the summary. 

Do any of these solutions sound workable for you?

Thanks,

Don

 
New Post
 2/20/2008 1:55 AM
Don Worthley
201 posts
9th Level Poster


Re: Bug? (rare, but sometimes truncated non-closing script tags)
 

I should have mentioned the details of how to use the extended entry feature in Windows Live Writer for those who may not have used this.  It's actually a really nice way to add your summary, which gives you much more control over what appears as the summary. 

In Windows Live Writer, begin writing the summary at the top of the post.  When you are finished with the summary, click Split Post from the Options menu.  This will place something that looks like a horizontal rule in the page along with some text that says "More."  When you use Split Post to add extended content, the top becomes the summary and the bottom becomes the actual content. 

When you use the metaPost blog provider this way (along with setting the max summary to a high value in Module Options), the blog module operates more like the Ventrian News Articles module where the summary has no limit.  It can be as long as you like.  This is the way I prefer to use the module and it doesn't allow for any truncation as long as you've set the max summary value high enough.

HTH,

Don

 
New Post
 2/23/2008 6:14 AM
Sky
11 posts
No Ranking


Re: Bug? (rare, but sometimes truncated non-closing script tags)
 

Thanks for the information on Split bar. It solves the cut off problem...I think :-)

 

 
Previous Previous
 
Next Next
 Forum Forum metaPost Forums metaPost Forums metaPost Featur... metaPost Featur... Bug? (rare, but sometimes truncated non-closing script tags) Bug? (rare, but sometimes truncated non-closing script tags)
 Print