6

I just received a comment on an answer that started out with italicized text.

Writing to a section in an INI file

It will only replace anything up to the last valid key/value pair. Anything else beyond will be left as is. This explains the behavior...

In the global inbox, the word italic is shown in the message. I imagine it will do something similar to bold or code comments. I'm also seeing the same behavior in the Android app so it's not specific to the top-bar global inbox but apparently with how the notification text is generated.

enter image description here

I'm not sure if this applies only to comments or answers, bounties or other non-system inbox notifications with user text.

Not really a problem for me but thought it was worth a mention. Bug?

4
  • Hmm, I wonder if the commenter initially wrote the comment with the word italic or did <italic>... then edited it to be correct. AFAIK, the inbox will show the original comment but not show any edits (and the comment was edited). Commented Feb 21, 2014 at 19:44
  • Could someone do me a favor and write a comment here starting with _italic text_, **bold text**, and `code` text? Just want to test my theory. Commented Feb 21, 2014 at 19:46
  • 1
    TEST in italics. TEST in bold. TEST in code. Commented Feb 21, 2014 at 19:48
  • 1
    @ObliviousSage: looks like it was edited out. Your comment just showed the text. i.sstatic.net/s79E9.png Commented Feb 21, 2014 at 19:50

1 Answer 1

1

All HTML is stripped from the comment excerpts, always. This includes any italic, bold, code, links, etc. Comments cannot have custom HTML, so all < and > characters get encoded to begin with. It's as simple as running a strip_html function on the comment.

If you want, go through your Stack Exchange inbox. You'll never find a comment with any sort of formatting on it. ;)

1
  • 1
    I guess my theory on it being edited was correct. @ObliviousSage's comment to me did not have any of the text I mentioned. i.sstatic.net/s79E9.png Commented Feb 21, 2014 at 19:52

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .