| @@ -174,12 +174,13 @@ | ||
| 174 | 174 | ), |
| 175 | 175 | ); |
| 176 | 176 | |
| 177 | 177 | if ( $has_threats ) { |
| 178 | - $node['href'] = esc_url( Redirect::get_url( 'calypso-scanner' ) ); | |
| 179 | - $node['meta']['onclick'] = 'window.open( this.href ); return false;'; | |
| 180 | - $node['meta']['class'] = 'error'; | |
| 181 | - $node['title'] = sprintf( | |
| 178 | + $node['href'] = esc_url( Redirect::get_url( 'calypso-scanner' ) ); | |
| 179 | + $node['meta']['target'] = '_blank'; | |
| 180 | + $node['meta']['rel'] = 'noopener noreferrer'; | |
| 181 | + $node['meta']['class'] = 'error'; | |
| 182 | + $node['title'] = sprintf( | |
| 182 | 183 | esc_html( |
| 183 | 184 | /* translators: %s is the alert icon */ |
| 184 | 185 | _n( '%s Threat found', '%s Threats found', $this->get_threat_count(), 'jetpack' ) |
| 185 | 186 | ), |
| @@ -209,9 +210,9 @@ | ||
| 209 | 210 | if ( empty( $scan_state ) ) { |
| 210 | 211 | return null; |
| 211 | 212 | } |
| 212 | 213 | // Return true if there is at least one threat found. |
| 213 | - return (bool) isset( $scan_state->threats[0] ); | |
| 214 | + return isset( $scan_state->threats[0] ); | |
| 214 | 215 | } |
| 215 | 216 | |
| 216 | 217 | /** |
| 217 | 218 | * Returns the number of threats found or 0. |