You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Xml - don't automatically encode attribute values #1610
Currently xml attributes are encoded when run through CSharpier, which results in them being less readable.
Input
<TargetName="Transform"BeforeTargets="Build">
<MessageImportance="high"Text="@(MyItems->'MyItems has %(Identity)', ', ')" />
</Target>
Output
<TargetName="Transform"BeforeTargets="Build">
<MessageImportance="high"Text="@(MyItems->'MyItems has %(Identity)', ', ')" />
</Target>
This happens automatically with XAttribute but the code does make use of that along with the associated XmlAttribute to keep the original new lines in attribute values. Does using only XmlAttribute cause some other issue? Can the code figure out how to keep unencoded values for everything?
Activity
belav commentedon Jul 13, 2025
XmlAttributealways gives the unencoded value.XAttrbituealways gives the encoded value.This may require deciding which values should be encoded. This is a test to ensure we keep encoded values.
Ideally the original file would be taken into account. Keeping values encoded if they were encoded there.
Creating a POC for how to get the original attribute value from XML
Creating a POC for how to get the original attribute value from XML
Creating a POC for how to get the original attribute value from XML
Creating a POC for how to get the original attribute value from XML
Reworking how xml is parsed so that it can be formatted and preserve …
Bump csharpier from 1.1.2 to 1.2.1 (#12)