Feed Manager 2 issues: bad escaping and bad thumbs

This is the place to report bugs and get support. When posting in this forum, please always provide as much detail as possible.

Please do not report problems with a custom build or custom code in this forum. If you are producing your own build from the source code and have problems or questions, ask in the developer forum, do not report it as a bug.

This is the place to report bugs and get support

When posting in this forum, please try to provide as many relevant details as possible. Particularly the following:

  • What operating system were you running when the bug appeared?
  • What database platform is your site using?
  • What version of mojoPortal are you running?
  • What version of .NET do you use?
  • What steps are necessary to reproduce the issue? Compare expected results vs actual results.
Please do not report problems with a custom build or custom code in this forum. If you are producing your own build from the source code and have problems or questions, ask in the developer forum.
This thread is closed to new posts. You must sign in to post in the forums.
4/19/2011 1:53:52 AM
Gravatar
Total Posts 537
feet planted firmly on the ground

Feed Manager 2 issues: bad escaping and bad thumbs

Two bugs in feed manager I think.

I added a feed manager wired up to the blog on my site

Feed manager: http://www.breconfans.org.uk/test2.aspx

Blog: http://www.breconfans.org.uk/blog.aspx

I have a post there with an apos and an ampersand in the title "Offa’s Orror & fly posting", and some images in the posts.

The feed manager produced a garbled version of the title, double escaping the apos/ampersand: "Offa’s Orror & fly posting " giving this in the page source (though not sure if this will survive posting on forum without even more escaping!)...

<a href='http://www.breconfans.org.uk/offa-rsquos-orror--amp-fly-posting.aspx' >
            Offa&amp;rsquo;s Orror &amp;amp; fly posting
                            </a>

Also the images disappear, which is odd because the source URLs look OK. Both of the image URLs are fine in this snip from my source, but the thumbnail doesn't appear:

<a rel="nofollow" href="http://www.breconfans.org.uk/Data/Sites/1/Windows-Live-Writer/Sugar-Loaf-Race_12989/image_2.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Rob, Angela and Martin Woodhead" border="0" alt="Rob, Angela and Martin Woodhead" src_NeatHtmlReplace="http://www.breconfans.org.uk/Data/Sites/1/Windows-Live-Writer/Sugar-Loaf-Race_12989/image_thumb.png" width="260" height="173" /></a>

Tested in IE9 and Chrome.

mojoPortal Version 2.3.6.4 SqlCe

Operating System Microsoft Windows NT 5.2.3790 Service Pack 2

ASP.NET Info v4.0.30319 Running in Full Trust 

Thanks

Crispin

 

4/19/2011 2:28:24 PM
Gravatar
Total Posts 537
feet planted firmly on the ground

Re: Feed Manager 2 issues: bad escaping and bad thumbs

More information on the escaping problem.

New info - this blog post was created and published from Windows Live Writer. I think that's relevant, because I've just created a new post on my web site itself, with apostrophe and ampersand in title, and all worked fine.

And another thing - the apostrophe coming from Windows Live Writer was actually a curly one - not sure what they are called, but it escaped as &rsquo;

So, in conclusion, it appears that when a post comes from WLW with funnies in the title, these are escaped before being saved into the Title and pseudo page name. Then somehow this causes problems when the ampersands in these escaped versions are escaped again for the RSS feed and post page.

The second issue I reported, about image thumbnails, remains as reported.

Crispin

4/20/2011 7:02:29 AM
Gravatar
Total Posts 18439

Re: Feed Manager 2 issues: bad escaping and bad thumbs

Hi Crispin,

For the image problem go into the settings for the feed manager, under Security Settings check the box to allow external images.

The double html encoding problem in the title is now fixed in the source code repository and it is is easy to fix in your copy of /FeedManager/FeedManagerModule.ascx.

Look for this:

<div class="rsstitle">
<%# "<" + FeedItemHeadingElement + ">" %>
  <a href='<%# DataBinder.Eval(Container, "DataItem.Link")%>' <%# GetOnClick() %>>
       <%# Server.HtmlEncode(DataBinder.Eval(Container, "DataItem.Title").ToString())%>
  </a><%# "</" + FeedItemHeadingElement + ">" %>
</div>

and change it like this:

<div class="rsstitle">
    <NeatHtml:UntrustedContent ID="UntrustedContent2" runat="server" TrustedImageUrlPattern='<%# allowedImageUrlRegexPattern %>'
  ClientScriptUrl="~/ClientScript/NeatHtml.js">
<%# "<" + FeedItemHeadingElement + ">" %>
  <a href='<%# DataBinder.Eval(Container, "DataItem.Link")%>' <%# GetOnClick() %>>
       <%# DataBinder.Eval(Container, "DataItem.Title").ToString()%>
  </a><%# "</" + FeedItemHeadingElement + ">" %>
</NeatHtml:UntrustedContent>
</div>

Best,

Joe

4/20/2011 3:35:43 PM
Gravatar
Total Posts 537
feet planted firmly on the ground

Re: Feed Manager 2 issues: bad escaping and bad thumbs

Thanks Joe on both issues, spot on.

Having spent a while playing with mojoPortal for my home site, I'm now (almost certainly) going to use it at work for client projects. Very impressed with the platform, and with the support from you and other users (we are pretty much asp.net forms + lots of interactive mapping using OpenLayers etc). Will be developing lots of new modules (migrating existing stuff), and will try to share back anything generic.

One question (totally out of scope - tell me if this needs to be in diff forum!)... the first existing site we will work on converting has existing .net membership stuff in the SQL Server DB (.net 2), plus all our business tables. And we've got lots of RI between the users and the business data they have created/edited. We'd like to migrate the lot over into a new DB that also contains all the mojo stuff. So we want existing users to become mojo users. Strategy? Can mojo add its structures to an existing DB with membership tables? Should we create a mojo db first, then migrate old DB contents across?

Advice appreciated here!

Crispin

4/21/2011 9:18:03 AM
Gravatar
Total Posts 18439

Re: Feed Manager 2 issues: bad escaping and bad thumbs

mojoportal cannot use your membership tables, if migrating the user data to the mojoportal tables is not an option possibly you could write sql triggers to sync the tables.

You can use whatever existing database you like to install mojoportal and there will not be any problems since the mojopotal tables all have prefixes it is not likely to clash with any existing tables. But internally it is going to use only its own tables.

Best,

Joe

You must sign in to post in the forums. This thread is closed to new posts.