Backport the fix from www/tidy-html5.
PR: ports/200631 Submitted by: Walter Hop Security: VuXML: bd1ab7a5-0e01-11e5-9976-a0f3c100ae18