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

Can I write inside the question title in a different color, as if I wanted to put the word (new) in red near a question or (special), for example
Interesting!  I tried adding a question with a following text:
Ask a test question in <a style="color:red">red</a> color
That text appeared as it is.  No colour.
I then used the 'inspect' utility.  The '<' and '>' symbols were translated to '&lt;' and '&gt;'  I edited them back to '<' and '>' and I could then see the text in colour.

I haven't checked the code, but I think this is possible if posts are saved without translating the symbols and you explicitly add a html tag in the title.
HTML is escaped for security reasons. You don't want users to be able to embed arbitrary HTML in their questions.

Also, you don't want to allow users to color their question titles. The end result of that would be a rainbow-colored question list (and I mean Geocities-eye-cancer-style rainbow-colored), because every user thinks their question is the most important question in the world. Except it isn't for literally everyone else.
I was just reading up XSS and realized that tags in text can be exploited in many ways!!

Also agree with your second point :)
@JKini Can you create a question with the steps to reproduce the potential exploits you're confirming here? Thanks.

Please log in or register to answer this question.