Browse Source

Disconnect comment links fom the WebUI (#15251)

adaptive-webui-19844
Daniel Aleksandersen 3 years ago committed by GitHub
parent
commit
60b1e692b9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      src/webui/www/private/scripts/misc.js

2
src/webui/www/private/scripts/misc.js

@ -163,7 +163,7 @@ window.qBittorrent.Misc = (function() {
*/ */
const parseHtmlLinks = function(text) { const parseHtmlLinks = function(text) {
const exp = /(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#/%?=~_|!:,.;]*[-A-Z0-9+&@#/%=~_|])/ig; const exp = /(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#/%?=~_|!:,.;]*[-A-Z0-9+&@#/%=~_|])/ig;
return text.replace(exp, "<a target='_blank' href='$1'>$1</a>"); return text.replace(exp, "<a target='_blank' rel='noopener noreferrer' href='$1'>$1</a>");
} }
const escapeHtml = function(str) { const escapeHtml = function(str) {

Loading…
Cancel
Save