Skip to content

Commit

Permalink
add target=_blank to
Browse files Browse the repository at this point in the history
  • Loading branch information
John Spellman committed May 8, 2023
1 parent e667a57 commit 99f4652
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion php/pantheon/utils.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public static function sanitize_data($data, $sanitizer_function = 'htmlspecialch
$sanitized_link_text = call_user_func($sanitizer_function, $anchors[0]->textContent);

// Rebuild anchor tags to ensure there are no injected attributes.
$rebuilt_link = '<a href="' . $sanitized_href . '">' . $sanitized_link_text . '</a>';
$rebuilt_link = '<a href="' . $sanitized_href . ' target="_blank"">' . $sanitized_link_text . '</a>';
return $rebuilt_link;
}
}
Expand Down

0 comments on commit 99f4652

Please sign in to comment.