anchor attribute target is NOT deprecated

5 views
Skip to first unread message

Charles Roth

unread,
Sep 22, 2026, 12:25:06 PMSep 22
to htmlpurifier
There's an outdated note in the documentation (http://htmlpurifier.org/docs#toclink6) that says "The target attribute has been deprecated for a long time".

This is INCORRECT.  The target attribute was deprecated in HTML 4 strict, but this was REVERSED in HTML 5.   It is now officially a perfectly valid, useful, and legal attribute.

If any of the documentation maintainers are reading this, please take note.

As noted elsewhere, the work-around to allow the target attribute is:
$config->set('Attr.AllowedFrameTargets', ['_blank']);

Reply all
Reply to author
Forward
0 new messages