Why can't RSS handle the ampersand?

前端 未结 7 834
滥情空心
滥情空心 2021-01-04 10:53

When I come across a broken RSS feed, the usual reason its all blown to pieces is because line 23 says \"Sanford & Sons.\"

The most confusing thing is the fact

7条回答
  •  一生所求
    2021-01-04 11:30

    This depends highly on the RSS client, but most likely it's attempting to XML-decode the contents (in your example "Sanford & Sons"). When that happens, & indicates an escaped character. If you don't use & as it decodes, it will try to use the next few characters to complete the escape sequence. Odds are highly likely that it will fail.

提交回复
热议问题