Comment text not escaped properly

Bug #359025 reported by Stanislaw Pitucha
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ideatorrent
New
Undecided
Unassigned
Nominated for 0.9 by Stanislaw Pitucha
Nominated for Trunk by Stanislaw Pitucha

Bug Description

Text in comments is not escaped properly, so parts of it can disappear. I see the problem when using <> characters, but maybe something else is affected too.
Any text in between "<....>" is removed when the comment is saved.

Revision history for this message
Sayak Banerjee (sayakb-deactivatedaccount) wrote :

That is because the comments have HTML formatting allowed. you can use &lt; and &gt; for < and > respectively.

Changed in ideatorrent:
status: New → Incomplete
Revision history for this message
Stanislaw Pitucha (viraptor-gmail) wrote :

That doesn't solve the issue. There are only a couple of tags allowed / understood. Simply cutting everything else inside <>, means that when I paste in a piece of code or a command or even simple text that includes those characters:
- text will be removed - many words may be lost
- the comment cannot be fixed later on
- comment may become incorrect but may still look ok - and the situation will just confuse readers

Why not just interpret tags that can be interpreted, but escape everything else? If someone writes:
  <bn>some text</b>
by accident, people will understand what was supposed to happen when they see the original text. On the other hand, if someone writes:
  some_command < some_file > other_file
and people see:
  some_command other_file
information will be simply incorrect (which might lead to data loss in some extreme cases).

Allowing users to edit the comment could also help - assuming that author notices the mistake (why would I read the comment I just submited though?)
I know how to escape the contents properly, I know that brainstorm uses markup, yet I made that mistake 3 times already.

Revision history for this message
Stanislaw Pitucha (viraptor-gmail) wrote :

Commented on the "incomplete" status 3 weeks ago. Reverting to new.

Changed in ideatorrent:
status: Incomplete → New
Revision history for this message
Stanislaw Pitucha (viraptor-gmail) wrote :

Yet another problem with not escaping user's text -> if you write an "arrow" to mark some text like this:

- some
- list <--
- blah

then everything after "list" will be removed from the post (like an unclosed tag)

Revision history for this message
Stanislaw Pitucha (viraptor-gmail) wrote :

Yet another comment - braces seem to be disappearing from comments - probably for some reason similar to lt/gt signs problems.

To see that is can cause problems when people talk about code, look at http://brainstorm.ubuntu.com/idea/19903/ and comments from "bryonak" and "gelsbern".

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.