Would it be alright to make an explicit parser option for handling unquoted attribute values?
This is a backward-compatible change that allows users to specify how they want unquoted attributes handled. If it isn't specified, we fall back to the original behavior by following strict/loose mode.
Regression Tests
Similarly to #267, I've run the regression test script from #266, and can confirm it passes.
Alternatives
It looks like downstream projects that want to use strict mode, yet also want to allow unquoted attributes, can safely throw away error events with the message Unquoted attribute value if they want this behavior. We could do this instead, if introducing an explicit option upstream is undesirable.
Not certain if that way of handling it could be problematic or have side effects, so I thought this change would be safer.
Would it be alright to make an explicit parser option for handling unquoted attribute values?
This is a backward-compatible change that allows users to specify how they want unquoted attributes handled. If it isn't specified, we fall back to the original behavior by following strict/loose mode.
Regression Tests
Similarly to #267, I've run the regression test script from #266, and can confirm it passes.
Alternatives
It looks like downstream projects that want to use strict mode, yet also want to allow unquoted attributes, can safely throw away error events with the message
Unquoted attribute value
if they want this behavior. We could do this instead, if introducing an explicit option upstream is undesirable.Not certain if that way of handling it could be problematic or have side effects, so I thought this change would be safer.
Related