Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

List choice label with < and character next to it are interpreted as html and not rendered #1570

Open
BobEvans opened this issue Sep 19, 2017 · 3 comments

Comments

@BobEvans
Copy link
Collaborator

Appears on the Android client.
To recreate:
Create a list choice question with one list choice containing "Frequency <5".
Note that on the phone this question gets truncated after
Frequency ".

@josmas
Copy link

josmas commented Mar 9, 2018

This happens in all places, not just in lists. If you add a question title for an input such as Is Frequency <5? you will see the same issue.

But this only happens if there is a character right after the < sign, such as <5 but not if there is a space, for instance: Frequency < 5. Also closing the sign with > will skip whatever is in between both signs, and render the rest (left and right).

Is HTML in the questions and answers something wanted? For instance a question could be: Are you <b>really</b> sure? and it would display as: Are you really sure? in the app (it works, I've tested it).

If that is the case, then there is nothing to fix. Just warn users that HTML is allowed in the form fields for inputs. If that is not the case, then I believe the fix is not to interpret the HTML text in InputLayout.java, in places such as lists listChoices.add(Html.fromHtml(currentChoice)); and other textual values.

I'd be happy to prepare a PR if HTML should NOT be allowed; can anyone confirm?

@BobEvans
Copy link
Collaborator Author

BobEvans commented Mar 10, 2018 via email

@josmas
Copy link

josmas commented Mar 11, 2018

Hey @BobEvans, thanks for the reply.

So there's nothing to fix then, just warn users that they should use Frequency &lt;5 if they want the above in any question heading or answer choice?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants