Home > front end >  XML is failing to render because of the url
XML is failing to render because of the url

Time:03-14

I am trying to add a url in a url tag in xml file, when I am testing it on the browser whether it opens the xml page or not, it fails to load 1

here is the xml content

<?xml version="1.0" standalone="yes"?>
<rss xmlns:sparkle="http://www.andymatuschak.org/xml-namespaces/sparkle" version="2.0">
    <channel>
        <title>Zen Mode</title>
        <item>
            <title>1.0</title>
            <pubDate>Sun, 13 Mar 2022 12:44:47  0530</pubDate>
            <sparkle:version>1</sparkle:version>
            <sparkle:shortVersionString>1.0</sparkle:shortVersionString>
            <sparkle:minimumSystemVersion>12.0</sparkle:minimumSystemVersion>
            <enclosure url="https://firebasestorage.googleapis.com/v0/b/zen-mode-a3f5b.appspot.com/o/Zen mode.zip?alt=media&token=b683691f-ea05-4eeb-b055-b3fac38d7390" length="1759048" type="application/octet-stream" sparkle:edSignature="aogXf4IHVLwxqhH/qweqe YLpm3 E6QLL1QKfr9ESN4 eApwz5AA=="/>
        </item>
    </channel>
</rss>

I tried debugging in vscode like does it shows any errors or not, the document was opened but there is a red color sign on it & enter image description here

My goal is xml should open on the browser without any parsing issues. Note: I tried replacing with other url Ex: https://google.com which worked

CodePudding user response:

Replace & with &amp;

The XML entity for an ampersand.

Here working code:-

<enclosure url='https://firebasestorage.googleapis.com/v0/b/zen-mode-a3f5b.appspot.com/o/Zen mode.zip?alt=media&amp;token=b683691f-ea05-4eeb-b055-b3fac38d7390' length="1759048" type="application/octet-stream" sparkle:edSignature="aogXf4IHVLwxqhH/qweqe YLpm3 E6QLL1QKfr9ESN4 eApwz5AA=="/>
  • Related