Bug or intentional?
I'm attempting to add a feed post programmatically. The text of the post has a link with a target attribute. The target attribute is getting stripped. I found in the FeedsHelper mdToHtml function, the call to wp_kses includes an array of allowed html tags. The entry for links looks like this:
'a' => array(
'href' => true,
'title' => true,
'rel' => true,
'_target' => true,
),
Is the _ before target intentional or a typo/bug in the code? Should target attributes be allowed when creating posts programmatically?
Thanks!
ChangeΒ '_target' => true,Β toΒ 'target' => true,Β in the array. Can you tell me with this, does it work? It should work.
Tawsif Ahmed RiyadΒ Yep, it does work. Is that a change that will made to the official code? Thanks!!
Thomas Oates, yeah, a change will be made. As it was a typo, actually.
Tawsif Ahmed RiyadΒ Awesome...thanks!
Thomas Oates, you are most welcome.
Yes, it will be target instead of _target. Will be fixed in the next version
Thomas OatesΒ yes. Need to remove _