showdownjs / showdown

A bidirectional Markdown to HTML to Markdown converter written in Javascript
http://www.showdownjs.com/
MIT License
14.26k stars 1.56k forks source link

Add option to decorate links with noreferrer and noopener #811

Closed keul closed 4 years ago

keul commented 4 years ago

When links are opened in a new window using openLinksInNewWindow could be useful to have a way to put additional rel attributes like noreferrer and noopener to prevent security issues or tracking.

evilaliv3 commented 4 years ago

@keul: while thinking to the same topic in order to implement some additional protection in relation to the use of markdown in GlobaLeaks (https://github.com/globaleaks/GlobaLeaks/issues/2879) I just discovered that @Showdown already perform it automaticall in relation to external links.

Try to perform a test using an external link on a different domain and you will notice that `noreferrer and noopener will be automatically added.

keul commented 4 years ago

@evilaliv3 you are right! I was still on version 1.8.6 where the feature is not available!

Thank you!