Skip to content

Commit

Permalink
[FIX] JSDoc: Use the rel="noopener" attribute for external links. (#361)
Browse files Browse the repository at this point in the history
  • Loading branch information
codeworrior authored and RandomByte committed Nov 7, 2019
1 parent cecc97d commit c702104
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/processors/jsdoc/lib/transformApiJson.js
Original file line number Diff line number Diff line change
Expand Up @@ -1263,7 +1263,7 @@ function transformer(sInputFile, sOutputFile, sLibraryFile, vDependencyAPIFiles,
// Check if the external domain is SAP hosted
let bSAPHosted = /^https?:\/\/(?:www.)?[\w.]*(?:sap|hana\.ondemand|sapfioritrial)\.com/.test(sTarget);

return `<a target="_blank" href="${sTarget}">${sText}</a>
return `<a target="_blank" rel="noopener" href="${sTarget}">${sText}</a>
<img src="./resources/sap/ui/documentation/sdk/images/${bSAPHosted ? 'link-sap' : 'link-external'}.png"
title="Information published on ${bSAPHosted ? '' : 'non '}SAP site" class="sapUISDKExternalLink"/>`;
},
Expand Down

0 comments on commit c702104

Please sign in to comment.