test-bot: better xml character filtering #50092
Conversation
@xu-cheng 👏 👍. Could you try to add a PR after this is merged to e.g. bump the revision on one of the formulae that had failures before? |
Ref: - http://www.w3.org/TR/xml/#charsets - http://stackoverflow.com/a/14323524 Closes Homebrew/legacy-homebrew#50092. Signed-off-by: Xu Cheng <xucheng@me.com>
Revert in 5a850cf because weird encoding problem. |
Maybe the problem was the Unicode escape Ruby string syntax.
If I understand correctly, the plain
|
@apjanke Could you try one with the new syntax? Might be worth adding a unit test (not for the test bot) to verify this is behaving as expected and doesn't blow up on 1.8. |
Sure. I'll take a hack at this. |
I think I have a fix for this – apjanke/brew@eb8db20. I think it's not just the character replacement syntax, but needs an adjustment to the bytewise output buffering, too. I don't know how to write a unit test for it, since Works locally for me on 10.9 and 10.11, as verified by manual inspection and running
It runs without error under Should I just push this and see how it goes? Might take a while to come up with a unit test, since the |
Oh, never mind about the Ruby 1.8.7 breakage. I had accidentally switched back to the
I think this suggests that it was actually the bytewise buffering that was the problem here, and not necessarily the invalid-XML-character replacement pattern used later. (Though that should definitely be altered too.) |
Ref: