Skip to content

new - Escape illegal XML characters that would be passed into the nuspec #1534

Open
@SolidKnight

Description

@SolidKnight

What You Are Seeing?

choco new permits illegal XML characters to be passed into the .nuspec file which can prevent choco pack from succeeding.

What is Expected?

It should either reject the input or correct it automatically--the later being nicer option when setting the title to the software's display name automatically/with helper tools.

In my specific situation, my package names are CLI friendly and follow a predictable scheme while the title is set to match the package's name as it appears in Programs and Features. Some of the names contain characters such as &. The behavior of choco new places the burden on the toolmaker for sanitizing input.

How Did You Get This To Happen? (Steps to Reproduce)

Pass in an illegal XML character into the title element with choco new.
choco new A^&B using CMD
It lets you despite how that will not be able to be packaged.

Or directly edit the .nuspec as such

<title>Veeam Backup & Replication Console</title>

Execute choco pack ...

An error occurred while parsing EntityName. Line 37, position 26.
or
'<' is an unexpected token. The expected token is ';'. Line 25, position 12.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions