Welcome! » Log In » Create A New Profile

Multilingual projects: Add array with hosts for isLocal?

Posted by KillerBee 
Multilingual projects: Add array with hosts for isLocal?
November 23, 2016 08:38AM

I want add

http://htmlpurifier.org/live/configdoc/plain.html#HTML.Nofollow

for outgoing links. My project is multilingual, so I have different domains like

1. www.domainA.com 2. abc.domainA.com 3. www.domainB.de 4. www.domainC.fr

That all no need a "nofollow", all domains point to the identical web-content, only GUI is translated.

http://htmlpurifier.org/live/configdoc/plain.html#URI.Host

is only for a single string value. Is here a way to add valid hosts or exclude domains for nofollow?

Re: Multilingual projects: Add array with hosts for isLocal?
November 23, 2016 10:51AM

There's no way to do this with the given config options. But it's not too hard to adapt library/HTMLPurifier/AttrTransform/Nofollow.php into the version you need (you could patch it first; but you can also use http://htmlpurifier.org/docs/enduser-customize.html to write your own AttrTransform class, and then register it yourself.)

Sorry, you do not have permission to post/reply in this forum.