OpenBazaar / openbazaar-desktop

OpenBazaar 2.0 Desktop Client (talks to openbazaar-go server daemon)
MIT License
647 stars 186 forks source link

Text included in About section need to accept raw inputs without changes during processing #1795

Open placer14 opened 5 years ago

placer14 commented 5 years ago

Brief Description: Users expect to add content into the About section which cannot be mutated (as it is used for crypto-based verification purposes). Currently, processors add line-breaks and paragraph HTML tags which do not allow crypto-verification on text to be performed. Need to consider how to allow text which will not be mutated to be available on the profile (whether as part of About or some other section entirely).

Operating System (OS and version): N/A OpenBazaar version (shown on About OpenBazaar page in menu): Hardware: N/A

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

Steps to reproduce:

  1. Add multiline paragraph to About
  2. Save

Observed Behavior: Observe the paragraph now as line breaks included.

Expected Behavior: Expect to have some way of including crypto-sensitive text without it being processed on save, so that another user may copy/paste it for verification without it failing.

Additional info (links, images, etc go here): It is not necessary to apply crypto-sensitive text to see the problem occur, though line breaks may not be as obvious.

jjeffryes commented 5 years ago

I took a look, Trumbowyg, our text editor, has a preformatted option that wraps text in <pre> and <code> tags. You can just add ['preformatted'] to the button list.

When I experimented, it left a pgp key sticking out of the side of the about page, so it'd need some work to make sure it looks right, but it seems like it might work.

pinheadmz commented 5 years ago

Following this issue. I've used <br>'s to get the desired spacing on an OB profile:

https://openbazaar.com/store/home/QmdAQLHfGx1yUWC1mqcjar1w7oimUDS4S8qFaYSbXyt6TC