CDATA in <title> tag issue

519 views
Skip to first unread message

gwthompson

unread,
Jan 23, 2010, 9:50:44 AM1/23/10
to TapLynx
Hi Brent,

I have come across a feed for one of my clients that is using the
CDATA tag within the <title> tag for their RSS feed. Why they are
doing it is beyond me.

Anyway... none of the feed will display in TapLynx with this tag in
existence. I've taken a copy of the XML, removed the CDATA tag from
the title and threw it up on my server for testing and everything
works fine.

Should the CDATA tag in the <title> be causing TapLynx issues?

Thanks,
gt

Brent Simmons

unread,
Jan 23, 2010, 2:27:42 PM1/23/10
to tap...@googlegroups.com
Could I see the feed? The CDATA should not be causing a problem.

Also try the feed validator:

http://feedvalidator.org/

-Brent

gwthompson

unread,
Jan 24, 2010, 10:19:07 AM1/24/10
to TapLynx
Hi Brent,

Here is the feed:

http://www.nationalguard.com/news.rss

It does not validate correctly but not due to the CDATA issue.

Thanks,
gt

Brent Simmons

unread,
Jan 25, 2010, 4:43:26 PM1/25/10
to tap...@googlegroups.com
The issue isn't the CDATA -- the issue is that the server is not returning an RSS feed to the app.

Instead, it appears that the server detects that the request is coming from an iPhone, so it's trying to deliver a mobile-formatted page instead of the feed.

Below is what the app is getting instead of the feed. Were this issue fixed on the server, the feed should work fine.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>

<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0;">

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="title" content="NATIONALGUARD.com" />
<meta name="description" content="The official recruiting site of the National Guard. Go to college for free, learn job skills, earn a paycheck while you serve your country and community part-time" />
<meta name="language" content="en" />
<meta name="robots" content="index, follow" />
<title>NATIONALGUARD.com</title>
<link rel="shortcut icon" href="/favicon.ico" />


<link rel="stylesheet" type="text/css" media="screen" href="/mobile/css/mobile.css" />
<link rel="stylesheet" type="text/css" media="screen" href="/mobile/css/homepage.css" />
<script type="text/javascript" src="/mobile/js/jquery.js"></script>
<script type="text/javascript" src="/mobile/js/mobile.js"></script>
</head>

<body>

<div id="wrapper">
<a href="/mobile/" id="logo">
<img alt="National Guard Logo" src="http://snowmedia.nationalguard.com/mobile/images/logo.png" /> </a>

<div id="content">

<ul class="navigation">
<li>
<a href="/mobile/car">
Learn More
<span>Contact a Representative</span>
</a>
</li>
<li>
<a href="/mobile/contact">
Talk to a Solider
<span>Get your questions answered via text or email</span>
</a>
</li>
<li>
<a href="/mobile/benefits">
Explore Benefits
<span>What does the Guard have to offer?</span>
</a>
</li>
<li>
<a href="/mobile/careers">
Guard Careers
<span>Start your Career with the Guard</span>
</a>
</li>
<li>
<a href="/mobile/news">
Guard News
<span>Read GX Stories</span>
</a>
</li>
<li>
<a href="/mobile/guardcard">
Guard Card
<span>Connect with the Guard</span>
</a>
</li>
</ul>
</div>

<div id="footer">
<p>
<a href="/mobile/full-site">View Full Site</a>
</p>

<p>
&copy; 2010 - United States Army National Guard
</p>
<p>
<a href="/mobile/car">Join Now</a> |
<a href="/mobile/contact">Talk to a Soldier</a> |
<a href="/mobile/benefits">Benefits</a><br/>
<a href="/mobile/careers">Careers</a> |
<a href="/mobile/news">News</a> |
<a href="/mobile/">Mobile Main</a>
</p>
2010-01-25 13:41:21.279 TestLynx[1931:4a07]
</div>
</div>

<!-- SiteCatalyst code version: H.20.3
Copyright 1997-2009 Omniture, Inc. More info available at
http://www.omniture.com -->
<script type="text/javascript">
var s_account="iostudioprod";
</script>
<script type="text/javascript" src="/mobile/js/s_code.js"></script>

<script type="text/javascript"><!--
s.pageName="mobile:home"
/************* DO NOT ALTER ANYTHING BELOW THIS LINE ! **************/
var s_code=s.t();if(s_code)document.write(s_code)//--></script>
<!-- End SiteCatalyst code version: H.20.3 -->

<script type="text/javascript">
//<![CDATA[
var gaJsHost=(("https:"==document.location.protocol)?"https://ssl.":"http://www.");
document.write(unescape("%3Cscript src='"+gaJsHost+"google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
//]]>
</script>
<script type="text/javascript">
//<![CDATA[
var pageTracker=_gat._getTracker("UA-9567748-1");
pageTracker._initData();
pageTracker._trackPageview();
//]]>
</script>
</body>
</html>

-Brent

gwthompson

unread,
Jan 26, 2010, 8:54:24 AM1/26/10
to TapLynx
Thanks for the detective work!

I'll have to find out why the client's web developers are doing that
for their RSS feeds. I can understand the regular site (which the
mobile detection isn't working on) but not the RSS.

gt


Reply all
Reply to author
Forward
0 new messages