UniValue: don't escape solidus, keep espacing of reverse solidus #6339

pull jonasschnelli wants to merge 1 commits into bitcoin:master from jonasschnelli:2015/06/json_escaping changing 3 files +2 −3
  1. jonasschnelli commented at 8:37 PM on June 24, 2015: contributor

    After the JSON RFC, solidus ('/') must not be escaped (https://www.ietf.org/rfc/rfc4627.txt see paragraph 2.5)

    JSON spirit did not escape a solidus.

    Escaping the solidus character made things look bad in bitcoin-cli (or possibly over other RPC clients).

    Example: Before this PR: http:\/\/127.0.0.1:8332

    After this PR: http://127.0.0.1:8332

  2. luke-jr commented at 8:42 PM on June 24, 2015: member

    utACK

  3. theuni commented at 8:50 PM on June 24, 2015: member

    I believe univalue/gen.cpp needs to be updated and run to re-generate this, no? I assume you just hand-edited this, but we should still ensure that it's still producing correct output.

  4. jgarzik commented at 4:24 AM on June 25, 2015: contributor

    Yes @theuni is correct.

  5. jonasschnelli force-pushed on Jun 25, 2015
  6. laanwj added the label RPC on Jun 25, 2015
  7. laanwj commented at 6:01 AM on June 25, 2015: member

    utACK

  8. jonasschnelli commented at 6:03 AM on June 25, 2015: contributor

    @theuni: Meh. Thanks! Wasn't aware of that. Fixed the gen.cpp file, gcc gen.cpp, ./a.out > univalue_escapes.h. The resulted file gave no changes to my manually edited file. The updated gen.cpp is now also included in this PR.

  9. jgarzik commented at 6:03 AM on June 25, 2015: contributor

    ut ACK

  10. UniValue: don't escape solidus, keep espacing of reverse solidus 77aeb7c964
  11. jonasschnelli commented at 6:10 AM on June 25, 2015: contributor

    Added covering for this escaping issue in univalue_tests.cpp.

  12. jonasschnelli force-pushed on Jun 25, 2015
  13. laanwj merged this on Jun 25, 2015
  14. laanwj closed this on Jun 25, 2015

  15. laanwj referenced this in commit c3f0490a06 on Jun 25, 2015
  16. zkbot referenced this in commit 9af55822fb on Feb 15, 2017
  17. zkbot referenced this in commit a7cf698873 on Mar 4, 2017
  18. MarcoFalke locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-13 15:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me