OpenBazaar-Server icon indicating copy to clipboard operation
OpenBazaar-Server copied to clipboard

Title disappears if "" are in it

Open Gitju opened this issue 8 years ago • 1 comments

Brief Description:

Operating System (OS and version): GNU/Linux 8.3 OpenBazaar version: 1.1.6 Hardware: Yes ;)

Reproducible (Always / Almost Always / Sometimes / Rarely / Couldn't Reproduce): Always

Steps to reproduce:

  1. Create an article with the Title "Article" Cool
  2. Save the article
  3. Edit the article

Observed Behavior: The title disappeared.

Expected Behavior: The title would not have disappeared.

Additional info (links, images, etc go here): This always just happens to me if I have "" in the title.

Gitju avatar Jun 08 '16 11:06 Gitju

This seems to be an issue with json; I can't get the test files to run on my computer, but from my isolated testing, it looks like storing the titles with backslashes inserted before all double quotes resolves this issue - i.e., replacing assignments such as self.previous_title = self.contract["vendor_offer"]["listing"]["item"]["title"] with self.previous_title = self.contract["vendor_offer"]["listing"]["item"]["title"].replace('"','"') possibly with two backslashes rather than one depending on how it's passed to json.

As for the accent issue, could that be solved by executing string.encode('utf8') to the string prior to writing string?

Edit: It seems like most of the issues I've been having in testing were more or less addressed in the README- although the "protos" module still can't be located

another-wes avatar Jul 06 '16 21:07 another-wes