hughsie / appstream-glib

This library provides objects and helper methods to help reading and writing AppStream metadata.
GNU Lesser General Public License v2.1
63 stars 102 forks source link

appstream-compose mangles values between some tags #350

Open barthalion opened 4 years ago

barthalion commented 4 years ago

We've noticed this some time ago in Flathub but I don't think anyone reported a bug here. Apparently some tags like <strong> and <em> end up as (null) in the resulting app-info file. Some examples:

Midori (https://github.com/midori-browser/core/blob/master/data/org.midori_browser.Midori.appdata.xml.in#L25):

<description><p>Midori is a lightweight yet powerful web browser which runs just as well on little embedded computers named for delicious pastries as it does on beefy machines with a core temperature exceeding that of planet earth. And it looks good doing that, too. Oh, and of course it&apos;s free software.</p><p>(null)</p><ul><li>Adblock filter list support.</li><li>Private browsing.</li><li>Manage cookies and scripts.</li></ul><p>(null)</p><ul><li>Open a 1000 tabs instantly.</li><li>Easy web apps creation.</li><li>Customizable side panels.</li><li>User scripts and styles a la Greasemonkey.</li><li>Web developer tools powered by WebKit.</li></ul></description>

Cheese (https://github.com/flathub/org.gnome.Cheese/blob/master/org.gnome.Cheese.appdata.xml.in.patch)

<releases>
      <release timestamp="1568073600" version="3.34.0">
        <url type="unknown">https://gitlab.gnome.org/GNOME/cheese/raw/3.34.0/NEWS</url>
        <description><p>(null)</p></description>
      </release>
    </releases>

Firefox (appdata at https://paste.xinu.at/9B4HNN4/):

<description><p>(null)</p><p>Meet Firefox Quantum. Fast for good.</p><p>Features:</p><ul><li>A powerful, new engine that’s built for rapidfire performance.</li><li>Better, faster page loading that uses less computer memory.</li><li>Gorgeous design and smart features for intelligent browsing.</li></ul><p>(null)</p><p>Crazy powerful browser engine? Check. Less time waiting around for pages to load? Also, check. Firefox Quantum is twice as fast as Firefox was before.</p><p>(null)</p><p>Whether you’ve opened 10 or 1000, switching between tabs is faster than ever with Firefox’s new, responsive engine.</p><p>(null)</p><p>The most powerful private browsing mode with added tracking protection.</p><ul><li>(null)</li><li>(null)</li><li>(null)</li></ul><p>(null)</p><ul><li>(null)</li><li>(null)</li><li>(null)</li></ul><p>(null)</p><ul><li>Seamlessly access passwords, bookmarks and more. Plus, use our Send Tabs feature to instantly share open tabs between desktop, mobile and tablet.</li></ul><p>(null)</p><p>Firefox is made by Mozilla, the non-profit champions of a healthy internet. Mozilla also tackles issues like privacy, misinformation and trolling by investing in fellowships, campaigns and new technologies designed to make the internet healthier.</p></description>
hughsie commented 4 years ago

This is a known issue; we just need someone to fix it. My worry here is also that old versions of gnome-software will just not show a description with strong and em -- so I think the compose tool should strip them out for the meantime.

jonathonf commented 4 years ago

This is a known issue; we just need someone to fix it.

Can someone point me in the direction of where the fix needs to be?