-
-
Notifications
You must be signed in to change notification settings - Fork 381
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
GlobalAttributeValueQuote Initial influencing empty attributes #575
Comments
Hello @cx-ricardop , Thank you for your PR; I will look at them soon. Indeed, v1.11.62 introduced many unwanted changes, and I feel that I should revert to the previous version for this part of the code. Since this version, we kept "patching" the code to get the right behavior. I will certainly look at the PR you are proposing. Best Regards, Jon |
Hello @cx-ricardop , If I understand correctly, you are currently suggesting two different fixes. So, I need to choose between both of your pull requests and cancel the other one. At this moment, I prefer the #576 as no new option has been added. What do you prefer? I will try to add more unit tests once we choose around the quoting to ensure we have and keep the right behavior. Best Regards, Jon |
Hi Jonathan, Thank you for taking the time to look into this issue. You’re correct, I’ve proposed two different fixes to provide options or better clarify the problem: Fix 1: Adjusts the initial behavior of quotetype, offering a minimal-impact fix that should not affect current users. In my view, the first fix is safer for the current version, while the second could be considered for a future major update. Do you have any doubts about my issue? Best Regards |
Hello @cx-ricardop , Perfect, I will check more the #576 this week. I don't have any doubt about your code. But I want to ensure that we don't cause more side impact as we did in the v1.11.62 |
html-agility-pack/src/HtmlAgilityPack.Shared/HtmlDocument.cs
Line 1870 in 973972a
1. Description
Since version v1.11.62, when the InternalQuoteType was introduced, I have noticed some unwanted changes in my conversions because it mixes the behavior of the QuoteType and WithoutValue in the attributes.
I'm my case I want to set the document to consider the Inicial QuoteType (the default, I believe) to maintain the original QuoteType and also set it to convert to an empty attribute (att=""). Supustly, converting to an empty attribute was the expected behavior but that isn't happening. Setting the GlobalAttributeValueQuote to Inicial the behavior is the same.
Example:
<bar ng-app class='message'></bar>
Actual:
<bar ng-app class='message'></bar>
Expected:
<bar ng-app="" class='message'></bar>
UT with default configs:
My suggestions:
Considering by default that setting the GlobalAttributeValueQuote to Initial will set the isWithoutValue to false;
Splitting the QuoteType and WithoutValue setting in two different settings;
The text was updated successfully, but these errors were encountered: