House of Fusion
Search over 2,500 ColdFusion resources here
  
Home of the ColdFusion Community

Mailing Lists
Home /  Groups /  ColdFusion Talk (CF-Talk)

rss cfc problem in IE9

  << Previous Post |  RSS |  Sort Oldest First |  Sort Latest First |  Subscribe to this Group Next >> 
Top  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Les Mizzell
08/15/2012 03:00 PM

It's always IE... Have a site that has a number of feeds using Raymond Camdens rss.cfc, version 0.1 It's been working great in every single browser, cell phone, you name it, since put into service years ago using an earlier version of the cfc. IE 9 comes along - when I look at a feed I get a blank page. Client sees something different - a page of run-on unformatted text. "View Source" shows me the XML source just like I'd expect. The XML source validates in the w3schools validator. Switching the IE9 browser mode to anything else - displays as it should. Anybody else had issues like this and can point to a fix? Google hasn't turned up too much helpful stuff yet. I may just rewrite the page using CFFEED and see what happens, but before I do that, just wondered if anybody else had seen issues like this and had a fix.

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Raymond Camden
08/15/2012 04:59 PM

Perhaps add cfcontent before the output to set the right type for RSS? ----- Excess quoted text cut - see Original Post for more -----

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
lesmizz
08/16/2012 01:17 AM

>Perhaps add cfcontent before the output to set the right type for RSS? I've been playing with this for the last few hours. Version 1, which uses rss.cfc does this: <cfcontent type="text/xml" reset="true"> <cfoutput>#rssxml#</cfoutput> This works fine in almost everything, except IE9 (for me). I see a blank page, although viewing the source looks correct. Client sees (also in IE9), run-on unformatted text. Really odd. Looking at the source, header looks like: <?xml version="1.0" encoding="ISO-8859-1" ?>   <rdf:RDF   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"   xmlns:dc="http://purl.org/dc/elements/1.1/"   xmlns="http://purl.org/rss/1.0/"   > I've gone ahead and written a test page using cffeed (CF8 version). Same result - almost... Still can't see it in IE9, works everywhere else, but another bug has cropped up. In the TITLE there's a single quote/apostrophe issue - regardless of what I do, I end up with "Tom's Hardware". Nothing seems to fix that. However, in the description (body), it displays correctly as "Tom's Harware". Go figure. If I check the actual string before it goes into the cffeed tag, it's showing a single quote "Tom's Hardware". Even stripping that out and replacing it with ' doesn't work. Still displays as "'" in the feed title. Code for cleaning this stuff for both description and title looks like:   <cfset request.titlenohtml = "#rereplacenocase(pr.title,"<[^>]*>","","all")#" />   <cfset request.titlemsclean="#ReplaceMicrosoftChars(request.titlenohtml)#"   />   <cfset request.titlemsclean = "#replace(request.titlemsclean, " ", " ", "ALL")#">   <cfset request.titlemsclean = "#replace(request.titlemsclean, "–", "-", "ALL")#">   <cfset request.titlemsclean = "#replace(request.titlemsclean, "&", "&", "ALL")#">   <cfset myStruct.item[currentRow].title = "#xmlFormat(request.titlemsclean)#" /> Header for the feed, now using RSS 2.0 instead of 1.0, looks like: <?xml version="1.0" encoding="UTF-8"?> <rss xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Raymond Camden
08/16/2012 07:18 AM

> This works fine in almost everything, except IE9 (for me). > I see a blank page, although viewing the source looks correct. So it may be just that IE9 doesn't want to render it. My question is - do you care? Your audience won't be viewing the raw XML anyway, so is this really an issue? > Still can't see it in IE9, works everywhere else, but another bug has cropped up. > In the TITLE there's a single quote/apostrophe issue - regardless of what I do, I end up with "Tom's Hardware". Nothing seems to fix that. However, in the description (body), it displays correctly as "Tom's Harware". Go figure. I believe this is just an HTML encoded version. Again - does it matter? In a feed reader it should display correctly. I guess in general - my question is - why are you 'testing' by viewing it in the browser anyway? -- =========================================================================== Raymond Camden, Adobe Developer Evangelist Email : raymondcamden@gmail.com Blog : www.raymondcamden.com Twitter: cfjedimaster

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Dave Watts
08/16/2012 09:53 AM

> I guess in general - my question is - why are you 'testing' by viewing > it in the browser anyway? Some people use their browsers to view feeds, actually. http://windows.microsoft.com/en-us/windows7/How-to-use-RSS-feeds-in-Internet-Explorer-9 Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ http://training.figleaf.com/ Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on GSA Schedule, and provides the highest caliber vendor-authorized instruction at our training centers, online, or onsite.

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Dave Watts
08/16/2012 10:00 AM

> I've gone ahead and written a test page using cffeed (CF8 version). > Same result - almost... Here's what I recommend you do. Use a plugin like Firebug, and very carefully examine the entire request and response from your feed, and compare it to a feed that works in IE 9. The problem is almost certainly some extra whitespace or junk that's keeping the browser from interpreting the response properly. > Still can't see it in IE9, works everywhere else, but another bug has cropped up. > In the TITLE there's a single quote/apostrophe issue - regardless of what I do, I end up with "Tom's Hardware". Nothing seems to fix that. > However, in the description (body), it displays correctly as "Tom's Harware". Go figure. I don't think that's a bug. Any XML metacharacters in an XML element or attribute must be escaped. The escape sequence for the single quote XML metacharacter is '. If the text containing the metacharacters is in an element, it can be escaped in an element body using CDATA, but in an attribute value that's not an option. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ http://training.figleaf.com/ Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on GSA Schedule, and provides the highest caliber vendor-authorized instruction at our training centers, online, or onsite.

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
lesmizz
08/17/2012 10:30 AM

> I don't think that's a bug. Any XML metacharacters in an XML element > or attribute must be escaped. The escape sequence for the single > quote XML metacharacter is '. The only thing I've been able to get work in the title is to just strip them out COMPLETELY. Anything else gets me "&apos" back in all the titles... <cfset request.titlemsclean = "#replace(request.titlemsclean, "'", "", "ALL")#"> What I REALLY don't understand is - why do they appear correctly in the description?

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
lesmizz
08/17/2012 11:11 AM

I think I've found the problem. I've got a stupid number of cleaning routines that everything goes through before it gets to the cffeed tag - mainly because the client does EVERYTHING in MS Word, then paste. At the end of the "clean" chain, before cffeed I do this: <cfset myStruct.item[currentRow].title = "#xmlformat(request.titlemsclean)#" /> If I REMOVE the xmlformat and just do this: <cfset myStruct.item[currentRow].title = "#request.titlemsclean#" /> All my problems seem to go away. OK, somebody tell me WHY? I though xmlformat was supposed to take escape the problems I was having...

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
lesmizz
08/17/2012 11:12 AM

I think I've found the problem. I've got a stupid number of cleaning routines that everything goes through before it gets to the cffeed tag - mainly because the client does EVERYTHING in MS Word, then paste. At the end of the "clean" chain, before cffeed I do this: <cfset myStruct.item[currentRow].title = "#xmlformat(request.titlemsclean)#" /> If I REMOVE the xmlformat and just do this: <cfset myStruct.item[currentRow].title = "#request.titlemsclean#" /> All my problems seem to go away. OK, somebody tell me WHY? I though xmlformat was supposed to escape the problems I was having...

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
lesmizz
08/16/2012 01:17 AM

>Perhaps add cfcontent before the output to set the right type for RSS? I've been playing with this for the last few hours. Version 1, which uses rss.cfc does this: <cfcontent type="text/xml" reset="true"> <cfoutput>#rssxml#</cfoutput> This works fine in almost everything, except IE9 (for me). I see a blank page, although viewing the source looks correct. Client sees (also in IE9), run-on unformatted text. Really odd. Looking at the source, header looks like: <?xml version="1.0" encoding="ISO-8859-1" ?>   <rdf:RDF   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"   xmlns:dc="http://purl.org/dc/elements/1.1/"   xmlns="http://purl.org/rss/1.0/"   > I've gone ahead and written a test page using cffeed (CF8 version). Same result - almost... Still can't see it in IE9, works everywhere else, but another bug has cropped up. In the TITLE there's a single quote/apostrophe issue - regardless of what I do, I end up with "Tom's Hardware". Nothing seems to fix that. However, in the description (body), it displays correctly as "Tom's Harware". Go figure. If I check the actual string before it goes into the cffeed tag, it's showing a single quote "Tom's Hardware". Even stripping that out and replacing it with ' doesn't work. Still displays as "'" in the feed title. Code for cleaning this stuff for both description and title looks like:   <cfset request.titlenohtml = "#rereplacenocase(pr.title,"<[^>]*>","","all")#" />   <cfset request.titlemsclean="#ReplaceMicrosoftChars(request.titlenohtml)#"   />   <cfset request.titlemsclean = "#replace(request.titlemsclean, " ", " ", "ALL")#">   <cfset request.titlemsclean = "#replace(request.titlemsclean, "–", "-", "ALL")#">   <cfset request.titlemsclean = "#replace(request.titlemsclean, "&", "&", "ALL")#">   <cfset myStruct.item[currentRow].title = "#xmlFormat(request.titlemsclean)#" /> Header for the feed, now using RSS 2.0 instead of 1.0, looks like: <?xml version="1.0" encoding="UTF-8"?> <rss xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">


<< Previous Thread Today's Threads Next Thread >>

Search cf-talk

May 21, 2013

<<   <   Today   >   >>
Su Mo Tu We Th Fr Sa
       1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31   

Designer, Developer and mobile workflow conference