Prevent styling of text in CSV files used in search()

1. What is the problem? Be very detailed.
My team uses CSV files extensively to power our selection fields. These files are created from answers of previous forms. Sometimes, users put in funny text, such as "hello_world_friend". When rendered as a selection, ODK Collect renders the underscores as markdown, which is somewhat confusing if you are expecting to see underscores. We would like a way to tell ODK not to render the underscores as markdown.

2. What app or server are you using and on what device and operating system? Include version numbers.

Aggregate v2.0.3
ODK Collect v1.22.4

3. What you have you tried to fix the problem?
N/A. We could manually write a parser to slip slashes in front of every markdown symbol but ... that seems like a lot of work to simply turn of a behavior and would probably be buggy.

4. What steps can we take to reproduce the problem?
Create a CSV file with any markdown in it, and load it into a search() expression.

5. Anything else we should know or have? If you have a test form or screenshots or logs, attach below.

I've seen this behavior and it's annoying to have formatting where you don't want to have. And I'm pretty sure I'm the person who wrote that code which makes it even more annoying :sob:

@martijnr do you have this problem in Enketo where people want to turn off Markdown? I'd like to make sure we have consistent behavior.

Accidentally, Enketo doesn't have this issue because Markdown is only parsed for texts that are defined inside the XForm. :sweat_smile: Naturally, I'd be in favor of making that the default :grinning:. That is not very consistent though (internal vs external data), so if you'd prefer to come up with a new appearance, I think I would support that. I haven't seen requests to turn it off nor to turn it on for external data.

1 Like

So @martijnr is the rough proposal idea that we add raw appearance to all questions that would output to raw text. I mean that seems easy enough...

Yes, that sounds good unless you'd be happy with always disabling markdown rendering for external data.

Either one would work for my needs. Thanks for considering this!