showdown/test/features/#379.openLinksInNewWindow-breaks-em-markdup.html
Jammerware 1cd281f064 fix(openLinksInNewWindow): add rel="noopener noreferrer" to links
Add rel="noreferrer" to links when openLinksInNewWindow is on. Also add noopener when openLinksInNewWindow is on.
target="_blank" without also adding rel="noopener noreferrer" creates a vulnerability
(since the site you're linking to has access to the window.opener by default.
This  adds rel="noopener noreferrer" to links generated by the makeHtml converter when openLinksInNewWindow is true.

Closes #670
2019-11-02 22:43:50 +00:00

3 lines
232 B
HTML

<p>My <a href="http://example.com" rel="noopener noreferrer" target="_blank">link</a> is <em>important</em></p>
<p>My <a href="http://example.com" rel="noopener noreferrer" target="_blank">link</a> is <strong>important</strong></p>