1

I have seen some postings about opening new windows for links within our SE sites to keep users in our sites and it should be possible to do by using the advanced hyperlinks I assume but it seems not to work for me.

To do it I followed the guidance provided in the formatting reference and just wrote the following:

<a href="www.climatedeal.org" target="_blank"> climatedeal </a>

Could someone enlighten me on what I am doing wrong when trying to open a new window with the link? Thanks!

flag
It seems like a reasonable request to allow target="_blank", if you want to create a feature-request – David Fullerton Dec 22 at 15:36

1 Answer

4

For security reasons (to prevent cross-site scripting), the SE engine only allows a very limited set of HTML tags in user posts (see this meta.SO post), and a limited set of attributes in <img> and <a> tags. Any HTML tags that don't belong to this set (or which have attributes that aren't allowed, or even just have the attributes in the wrong order!) are stripped out. In particular, the only attributes allowed in <a> tags are href and title, so you can't post a link on an SE site that opens in a new window.

When the SE engine sees your input
<a href="www.climatedeal.org" target="_blank"> climatedeal </a>
it decides that the HTML tags are unsafe, so it removes them, leaving just the text " climatedeal ". Sorry.

link|flag

Your Answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.