By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
460,023 Members | 1,297 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 460,023 IT Pros & Developers. It's quick & easy.

RSS 2.0 question - why are "=" characters not allowed in URLs, even inside the <link> tag?

P: n/a
Very odd. Check out this RSS feed that my PHP script just built:

http://www.tagcastle.com/rss/photography.xml

When I had a straight URL in the <link> tag, or the <comment> tag, then
"=" character drew an error and caused my XML to be not-well-formed. So
I hit it with the PHP command rawurlencode, and now it draws no error,
but it no longer works as a link.

What did I do wrong?

Dec 20 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a

Jake Barnes wrote:
Very odd. Check out this RSS feed that my PHP script just built:

http://www.tagcastle.com/rss/photography.xml

When I had a straight URL in the <link> tag, or the <comment> tag, then
"=" character drew an error and caused my XML to be not-well-formed. So
I hit it with the PHP command rawurlencode, and now it draws no error,
but it no longer works as a link.

What did I do wrong?


I should add, when I don't hit the query string with rawurlencode(),
I"m getting this error:

XML Parsing Error: not well-formed

Location: http://www.tagcastle.com/rss/photography.xml
Line Number 7, Column 77:

<link>http://www.tagcastle.com/index.php?whatPage=showOneTag.php&whatTag=photogra phy</link>
--------------------------------------------------------------------------------------------------------^

Dec 20 '05 #2

P: n/a
"Jake Barnes" <lk******@geocities.com> wrote in message
news:11**********************@g14g2000cwa.googlegr oups.com...
I should add, when I don't hit the query string with rawurlencode(),
I"m getting this error:

XML Parsing Error: not well-formed

Location: http://www.tagcastle.com/rss/photography.xml
Line Number 7, Column 77:

<link>http://www.tagcastle.com/index.php?whatPage=showOneTag.php&whatTag=photogra phy</link>
--------------------------------------------------------------------------------------------------------^

Perhaps it's the & that's causing the problem - try &amp; instead

HTH

Nadeem
Dec 20 '05 #3

P: n/a
On 20/12/2005 17:33, Jake Barnes wrote:
Jake Barnes wrote:
[snip]
When I had a straight URL in the <link> tag, or the <comment> tag, then
"=" character drew an error and caused my XML to be not-well-formed.


This has nothing to do with an equals symbol, though it took your
follow-up to identify the problem clearly.

[snip]
XML Parsing Error: not well-formed

Location: http://www.tagcastle.com/rss/photography.xml
Line Number 7, Column 77:

<link>http://www.tagcastle.com/index.php?whatPage=showOneTag.php&whatTag=photogra phy</link>


In XML (HTML, too) an ampersand (&) marks the beginning of an entity
reference. All 'Name' characters (in brief: mainly letters and numbers)
after that, up to a semicolon (;)[1], identify that entity. The entity
reference above (&whatTag;, I suppose) not only fails to end with a
semicolon, but doesn't exist anyway.

Long story short, the ampersand needs to be changed to an entity
reference, &amp;, just as it would need to be in HTML.

Mike
[1] As I understand it, in SGML, and therefore HTML
(technically), the semicolon wasn't necessary, and the first
character that didn't match the 'name' token would end the
reference. XML is more strict, however.

--
Michael Winter
Prefix subject with [News] before replying by e-mail.
Dec 20 '05 #4

P: n/a
Jake Barnes wrote:
Very odd. Check out this RSS feed that my PHP script just built:

http://www.tagcastle.com/rss/photography.xml


Not Found
The requested document was not found on this server.

Web Server at tagcastle.com

///Peter

Dec 21 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.