-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Building a package on Linux fails if the description has encoded xml special character(s) #27
Comments
Here is where the issue actually crops up: It is to do with the description put in the There is an issue open on mono for this here: |
Here is a list of the possibly affected metadata elements:
|
TheCakeIsNaOH
added a commit
to TheCakeIsNaOH/nuget-chocolatey
that referenced
this issue
Sep 29, 2021
On .Net fx, the PackageProperties elements have xml special chars escaped. On Mono, they do not get escaped. mono/mono#21227 In the process of reading the nuspec metadata, escaped chars like "<" get converted back into what they represent, for example "<". This is not an issue on Windows, but is it an issue on Mono. This manually escapes xml special chars from the PackageProperties strings. The id and version are not escaped, as they cannot contain xml special chars in the first place.
gep13
pushed a commit
to TheCakeIsNaOH/nuget-chocolatey
that referenced
this issue
Oct 14, 2021
On .Net fx, the PackageProperties elements have xml special chars escaped. On Mono, they do not get escaped. mono/mono#21227 In the process of reading the nuspec metadata, escaped chars like "<" get converted back into what they represent, for example "<". This is not an issue on Windows, but is it an issue on Mono. This manually escapes xml special chars from the PackageProperties strings. The id and version are not escaped, as they cannot contain xml special chars in the first place.
gep13
added a commit
that referenced
this issue
Oct 14, 2021
(#27) Escape PackageProperties elements
46 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is a companion issue to chocolatey/choco#2382
What You Are Seeing?
When running on Mono on Linux, if
choco pack
is run on a.nuspec
that contains encoded xml special character(s), it fails. Specifically with using<
and>
as shown in dust. This package does build without issues on Windows.It fails with
Unexpected end of file has occurred. The following elements are not closed:
I have not tested this to check if other encoded special characters work or not.
What is Expected?
That
choco pack
works.How Did You Get This To Happen? (Steps to Reproduce)
https://github.com/Starz0r/ChocolateyPackagingScripts/tree/ca30cc5f3eba19f535c82df46b57a2efc8bdf932
choco pack
Workaround
Wrapping the description in with
cdata
will allowchoco pack
to work.Example:
https://github.com/mkevenaar/chocolatey-packages/blob/master/automatic/anyrail6/anyrail6.nuspec#L48
Output Log
Full Log Output
The text was updated successfully, but these errors were encountered: