Error displaying some search results

This is an open forum for any mojoPortal topics that don't fall into the other categories.

This thread is closed to new posts. You must sign in to post in the forums.
1/22/2010 12:03:07 PM
Gravatar
Total Posts 251

Error displaying some search results

Some search results on mine does not show, and say, in red "sorry, there is a problem with this content"

']]>' is not allowed in character data. Line 3, position 3.:
"); //]]>--> ...

?

1/25/2010 10:22:34 AM
Gravatar
Total Posts 18439

Re: Error displaying some search results

Hi,

Look for this in SearchResults.aspx

<NeatHtml:UntrustedContent ID="UntrustedContent1" runat="server" TrustedImageUrlPattern='<%# mojoPortal.Web.Framework.SecurityHelper.RegexRelativeImageUrlPatern %>' ClientScriptUrl="~/ClientScript/NeatHtml.js">
                    <%# SecurityHelper.PreventCrossSiteScripting(DataBinder.Eval(Container.DataItem, "Intro").ToString()) %>
                    </NeatHtml:UntrustedContent>

change it like this:

<NeatHtml:UntrustedContent ID="UntrustedContent1" runat="server" TrustedImageUrlPattern='<%# mojoPortal.Web.Framework.SecurityHelper.RegexRelativeImageUrlPatern %>' ClientScriptUrl="~/ClientScript/NeatHtml.js">
                    <%# DataBinder.Eval(Container.DataItem, "Intro").ToString() %>
                    </NeatHtml:UntrustedContent>

The NeatHtml:UntrustedContent already protects us from XSS, so this extra method SecurityHelper.PreventCrossSiteScripting is redundant from a previous implementation and it is what shows the red message. I am making the same change in my copy.

Best,

Joe

1/25/2010 10:53:19 AM
Gravatar
Total Posts 251

Re: Error displaying some search results

fixed!

but still some pages show something like this:

Windows
"); //]]>--> ...
Windows
"); //]]>--> ...
Windows Mobile
"); //]]>--> ...
Windows Mobile
"); //]]>--> ...

why? because in that pages there is a javascript in the beginning of the page... my fault... i will remove it

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