Page MenuHomePhabricator

changelog: extract a _string_unescape() to mirror _string_escape()

Authored by martinvonz on Apr 2 2019, 3:30 PM.



We use our own _string_escape() to encode the "extras" field. Then we
use codecs.escape_decode() to escape it. But there's also a little
workaround for dealing with escaped text that looks like octal numbers
since the fix for This patch extracts
the call to codecs.escape_decode() along with the fix for octal
numbers and puts it in a _string_unescape(). It also updates the test
to check for the octal-number case from the aforementioned bug.

As you may have suspected, I want to be able to reuse this new
function later.

Diff Detail

rHG Mercurial
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.