Closed (works as designed)
Project:
HTML Purifier
Version:
6.x-2.4
Component:
Documentation
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
27 Apr 2011 at 17:11 UTC
Updated:
9 Nov 2012 at 19:34 UTC
I have HTML Purifier configured and the following inthe allowed tags list:
"a[name|href|target]"
Cleared cache, and target is still stripped from links.
If I switch out to a filter without HTML Purifier formatting, target is not stripped.
Am I missing something? How can I allow this basic attribute?
Comments
Comment #1
kevinquillen commentedJust noticed it also strips 'name'. href is the only attribute it will print.
Is this a module issue, or HTMLPurifier library issue?
Comment #2
kevinquillen commentedI edited the HTML Purifier module _htmlpurifier_get_config() and added:
$config->set('Attr.AllowedFrameTargets', array('_blank'));To allow targets.
Is there a hook to allow a custom module to tell HTMLPUrifier module about config additions? I saw there was a config dir with sample.php, but is there a way (say, if HTMLPurifier module was updated tomorrow) to keep changes safe?
Additionally, I tried naming the sample file to 2.php (for format number) and function to _2 instead of _N, but it was not working. Where do you copy this file to?
Comment #3
ezyang commentedYou should use the Advanced HTML Purifier, which gives you more config settings on the page (the config directory is a last resort for special configs, and doesn't really work anyway.)
Comment #4
kevinquillen commentedAre you sayin the config folder/file/hook for htmlpurifier is non-functioning?
Comment #5
ñull commentedWould be useful to indicate how to configure this in Advanced HTML Purifier. How do you add the allowed targets there?
Comment #6
ñull commentedIn Advanced HTML Purifier you have to add _blank (and or other allowed targets) to the AllowedFrameTargets setting and target has to be among the AllowedAttributes.
Of course these kind of issues, that all users of WYSIWYG will come accross, could be mentioned somewhere, may be in a readme.txt?
Comment #7
heddnSeems the original issue was resolved. Usability is being address in another issue: #925310: Configuration page should have inline examples