Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
0 votes
in Q2A Core by

If there is < in the question body and set minimum length to 100 then you get an error: please provide more information-At least 100 character.

to reproduce:

1. In admin/posting set Minimum length of question body to 100

2. choose markdown editor as your default editor

3. Ask a question with this text as the question body:

Let x<y and Lorem ipsum, or lipsum as it is sometimes known, is dummy text used in laying out print, graphic or web designs. The passage is attributed to an unknown typesetter in the 15th century who is thought to have scrambled parts of Cicero's De Finibus Bonorum et Malorum for use in a type specimen book.

3. Send the question

Now you see the error.

Q2A version: 1.8.3
Which markdown editor are you using?
1) https://github.com/svivian/q2a-markdown-editor
2) https://github.com/awei922/markdown-editor-for-q2a
3) some other markdown editor
The first one, Markdown Editor by Scott. I tested with the second one and the issue still exists there too.
edited by
That's because it thinks it's a tag, like <code>, and then it's expecting the
rest of it: some string and then the greater than sign (>). Here's why:

Quick workarounds:
(1) Put a space between "<" and "y"
(2) Replace "<" with "&lt;"
(3) Use `x<y` instead

The question's content is actually being received by Q2A but the current code at
shows there's two validations about question's body length:
(1) If the database can save it. Here it's okay because it receives "Let x<y and Lorem ipsum..."
(2) If the plain text rendering of content is less than or equal to 100 (in this case). Here it's   "Let x" because the viewer returns what it has before it was processing (and eating up) what it thinks is a tag.

Therefore, the error message is correct.

It also happens in other sites that use Markdown:
But my website is about mathematics and I can't force the users to put a space after each < sign! Is there a way to make a space after each < or replace < by &lt; automatically?
By introducing this customization, It'll be harder to introduce html tags such as <table>, <tr>, <td>, <code>, and so on.
True, Thank you Jair.

Please log in or register to answer this question.