Fixed error invalid URL escape "% ^" Closes #736 #735
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
@kai, I've created a draft PR to address issue #1954 and would appreciate your review.
I used the package
k8s.io/apimachinery/pkg/util/yaml
, which seemed effective in resolving the issue, though I'm open to suggestions if there's a more commonly used package for this purpose.During my attempts to fix the issue, I explored several other packages but they didn't yield the desired results:
To detail the error:
UnmarshalYAML()
function usedyaml.Unmarshal()
fromgithub.com/ghodss/yaml
andurl.QueryUnescape
fromnet/url
for decoding and parsing YAML to JSON.QueryUnescape
when a '%' wasn't followed by two hexadecimal digits.UnmarshalYAML
encountered an error with a specific code block in the template.Please feel free to suggest any modifications or alternative packages.
Thanks!