NuGetGallery icon indicating copy to clipboard operation
NuGetGallery copied to clipboard

[NuGet.org Bug]: License expressions aren't displayed correctly

Open iTrooz opened this issue 10 months ago • 5 comments

Impact

It bothers me. A fix would be nice

Describe the bug

On the package view page, Licence expressions aren't displayed correctly. For example my project is using the expression <PackageLicenseExpression>LGPL-2.1-only OR LGPL-3.0-or-later</PackageLicenseExpression> but it is rendered as:

Image

(link)

Repro Steps

  • Create a project
  • Use a license expression with a OR, such as <PackageLicenseExpression>LGPL-2.1-only OR LGPL-3.0-or-later</PackageLicenseExpression>
  • Pack using dotnet pack FreeDesktopSecrets.csproj --configuration Release
  • Upload to NuGet (notice the preview renders properly)
  • The package page doesn't render correctly

Expected Behavior

It should read LGPL-2.1-only license OR LGPL-3.0-or-later license instead

Screenshots

No response

Additional Context and logs

No response

iTrooz avatar Feb 17 '25 22:02 iTrooz

License exceptions, specified by using the "WITH" operator, are affected by the same. I have <PackageLicenseExpression>GPL-2.0-only WITH Universal-FOSS-exception-1.0</PackageLicenseExpression> in the project, which renders as:

Image

Seen in https://www.nuget.org/packages/MySql.Data.

fjssilva avatar Mar 17 '25 15:03 fjssilva

Should GPL-3.0-or-later license WITH Autoconf-exception-2.0 license be displayed with or without the word 'license' on the end?

JPGrieb avatar Mar 20 '25 21:03 JPGrieb

I'd say without any of them, or with only the last one but not as part of the link, even if single license.

fjssilva avatar Mar 24 '25 20:03 fjssilva

I'll fix this issue.

JPGrieb avatar Mar 25 '25 13:03 JPGrieb

Another example: https://www.nuget.org/packages/Devlooped.WhatsApp

Image

kzu avatar Apr 08 '25 03:04 kzu

This is deployed to DEV and resolved. Thanks to @JPGrieb for taking care of this!

joelverhagen avatar May 16 '25 19:05 joelverhagen