tera
tera copied to clipboard
escape_html: stop encoding slash, change apostrophe encoding to ', better docs
More details in the commit message.
I propose this as an alternative to #568; I wrote it before checking if someone had already done much the same thing (or else I would probably not have bothered—though I also have a vague feeling that I knew about #568 last year but have forgotten about it since), but I think my patch is more thorough.
I also propose that this shouldn’t be considered a breaking change; anything that depended on slash being escaped as /
was already catastrophically wrong; if you want to compare equality of serialised HTML (a very dubious operation in general, tests are the only place I’d even consider countenancing it), you need to normalise it first to be correct. I suppose this is the main argument against performing this change in a minor or patch release: you may break some tests, whether you consider those tests Incorrect-with-a-capital-I or not. After writing this out I guess I’m more sympathetic to the breaking-change classification, though I’m still fed up with gratuitously mangled URLs! 🙂
/cc @89z
It hasn't been ignored though? Just that it will be merged for a future major version as it's breaking imo. When a behaviour is specifically indicated in the docs, changing it is a breaking change.