sartography / spiff-arena

SpiffWorkflow is a software development platform for building, running, and monitoring executable diagrams
https://www.spiffworkflow.org/
GNU Lesser General Public License v2.1
44 stars 34 forks source link

Special character related issue - open quote ` character #1474

Open madhurrya opened 2 weeks ago

madhurrya commented 2 weeks ago

If the user type something within two open quotes (the key before the Number 1 key in the keyboard) ` or if it is typed in 2 form fields which will be displayed combined, when displaying that text it shows in a different format. And if there are &, < , > like characters inside that they show up as html entities like & amp ; etc

Image

Image

madhurrya commented 2 weeks ago

I think similar thing can happen with other characters like * etc (markdown)

jasquat commented 2 weeks ago

We have a sanitize_for_md method that maybe we could add to. There may already be something that can do this.

https://github.com/python-telegram-bot/python-telegram-bot/blob/1fdaaac8094c9d76c34c8c8e8c9add16080e75e7/telegram/utils/helpers.py#L149

sashayar13 commented 1 week ago

@jasquat, shall we check if the 'sanitize_for_md' helps with the issues, or do you say we need to make some changes to the method first?

jasquat commented 1 week ago

sanitize_for_md doesn't handle this case now, we have to add it but it should be used for cases like this.