Why wp_kses() not working for rel, target of link in Wordpress
I am using below code for wp_kses(). But it's ignoring rel target in the result. I want to show rel="nofolow" target="_blank" in my result (link).
$link = "Here is my link: a href="my-link" rel="nofollow" target="_blank"Link Text/a"
$allowed_tags= array(
'br' = array(),
'p' = array(),
'a' = array(
'href' = true,
'rel' = true,
'target' = true,
),
);
$result = wp_kses( $link, $allowed_tags );
Output result: Here is my link: a href="my-link"Link Text/a
Expected result: Here is my link: a href="my-link" rel="nofollow" target="_blank"Link Text/a