I'm using an HTML editor so that users can write forum posts. I've taken some time to develop accurate structured data. I'd like to extend that to the links that people share in their forum posts.
The following schema includes an itemprop for significantLink:
One of the more significant URLs on the page. Typically, these are the non-navigation links that are clicked on the most. Supersedes significantLinks.
This would be expressed as follows:
<a itemprop="significantLink" href="http://www.example.com">example</a>
I am using HTMLpurifier to sanitize the user generated HTML. These are my current configuration settings:
require_once 'src/htmlpurifier/library/HTMLPurifier.auto.php';
$config = HTMLPurifier_Config::createDefault();
$config->set('AutoFormat.RemoveEmpty', 'true');
$config->set('AutoFormat.Linkify', 'true');
$purifier = new HTMLPurifier($config);
I wonder, how can I convert ordinary links to add this itemprop using HTMLpurifier?