Forum Moderators: open

Message Too Old, No Replies

RSS Bug - "&" symbol causes an error

Using Smarty and Magpiers

         

wfernley

1:26 pm on May 22, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I was curious if anyone has encountered this before.

Whenever I enter an entry into my RSS feed that contains an "&" symbol, it causes an error. This can be in the title and most importantly in the URL. I need to get this fixed because a lot of URL's I try to enter contain an "&" in them.

Any ideas?

thanks!

davidpbrown

2:08 pm on May 22, 2006 (gmt 0)

10+ Year Member



Maybe try using & instead of just &

wfernley

2:14 pm on May 22, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Well first of of & contains & ;) and second, I don't think you can input & in a URL can you?

choster

2:21 pm on May 22, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The ampersand is a reserved character in XML; it must be escaped, e.g. as
[webmasterworld.com...]

wfernley

2:37 pm on May 22, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Great thanks for the post. I will do some testing and see how I can get this to work.

cabbagehead

9:56 pm on Jun 5, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You should probably escape any free-entry input that may contain characters such as this by wrapping the content in a CDATA section

e.g. <![CDATA[contnet here ]]>