0

I am currently creating a RSS feed for my website and have included Unsplash images in my blog posts. However, when I attempted to add these images into the RSS feed,

But i got one error

My Code

 <media:thumbnail url="https://images.unsplash.com/photo-1642665076339-ca50c80a44e7?
ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=2070&q=80"
 width="220"/>

but i got error

Error

The reference to entity "ixid" must end with the ';' delimiter. xml(SemicolonRequiredInReference)

Please suggest why i am getting this error

jon snow
  • 1
  • 1

1 Answers1

0

The ampersand (&) is a special character in HTML and XML. If you want to use it as a normal character, you have to encode it correctly. Write &amp; instead of &:

 <media:thumbnail url="https://images.unsplash.com/photo-1642665076339-ca50c80a44e7?ixlib=rb-4.0.3&amp;ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&amp;auto=format&amp;fit=crop&amp;w=2070&amp;q=80"
 width="220"/>

The & (here) denotes the start of an encoded entity, such as &lt; for <, or &amp; for the ampersand itself. In your case, the parser tries to interpret &w as an entity but such entities are always terminated with a semicolon (;); thus, if that ; is missing, you get the error message.

Adrian Mole
  • 49,934
  • 160
  • 51
  • 83
jon snow
  • 1
  • 1