At the most basic level, we should report to users what HTML tags and attributes are allowed (like you see in this bug tracker). But we should also report things "Images to foreign websites are DISABLED" and "Link anchors (name and id) are ENABLED".
At the most basic level, we should report to users what HTML tags and attributes are allowed (like you see in this bug tracker). But we should also report things "Images to foreign websites are DISABLED" and "Link anchors (name and id) are ENABLED".
Comments
Comment #1
ezyang commentedComment #2
aanjaneyam commentedHi, I am totally new to html purifier and the way it works. I just installed html purifier on my site for the first time. I am using ckeditor with wysiwyg module. After installing and editing some exiting content I found that there are lots unnecessary stuff (particularly empty divs and
) - during editing I pasted some stuff and also used remove format button of ckedior to remove formatting of the source of data. After removing these stuff the existing layout was still intact. So it meant the lines deleted were unnecessary. Why didn't it get removed by remove format button. Shouldn't htmlpurifier have sanitised them.
The above was just an idea of what's happening and what's going on in my mind. My actual question is as below:
The readme.text and other webpages like http://drupal.ckeditor.com/filters?page=6 suggest the following allowed tags for ckeditor:
and then they go on to suggest that with above tag list we wshould use htmlpurifier as html filter instead of default html filter.
when using the above allowed tag list with drupal default HTML filter most garbage was getting stripped. I started using htmlpurifier because I wanted to use inline styles. Now how to implement the above tag list in htmlpurifier. Sould I just put them in "Allowed" box on text format settings page. When putting the above list will other tags get stripped. Is there any other thing that can be done to cleanup. Also htmlprurifier website states the format of using allowed list as a,p,code,span,div,..... would this work in htmlpurifier drupal module.
Like the list stated above is there any other suggest or recommended list of allowed tags to be used in the scenario of drupal +ckeditor+htmlpurifier module. If yes what is that how it should be implemented.
Thanks
Comment #3
bryancasler commentedsubscribe
Comment #4
aanjaneyam commentedCould we please have some input on the issue.
Comment #5
Donaldd commentedsubscribing
Comment #6
ADrupalUser commentedsubscribing
Comment #7
epiphanydigital commentedI'd love to see a way to add the "scope" attribute for 508 compliance to
tds andth.Comment #8
temaruk commentedI added this list to the AllowedElements box under HTML, formatted according to http://htmlpurifier.org/live/configdoc/plain.html#HTML.AllowedElements .
After saving the configuration I receive these warnings:
?
Comment #9
ezyang commentedtemaruk, that is a different issue, please file a different bug.
Comment #10
alauddin commentedHi,
To configure html purifier you can follow these steps for say 'filtered text' format in drupal
1) disable - limit allowed html tags
2) Now enable html purifier and configure 'allowed' html elements using a comma separated list
like so
3) make sure html purifier is at the bottom of your overall enabled filters for this drupal text format.
you can see my blog post here for screenshot of settings page.
http://ilovedrupal.com/blog/html-purifier-configuration-drupal-7-ckeditor
Take care.
Comment #11
alauddin commentedadded p and br elements for allowed html code
Comment #12
heddnComment #13
heddnComment #14
heddnComment #15
heddnComment #16
naveenvalechaComment #17
ravi kant commentedHi @ezyang
As per comment of @aanjaneyam and @Alauddin, we can add most frequently using HTML allow as default.
So we can add README.md file.
I have created a separate ticket for README.md file.
https://www.drupal.org/project/htmlpurifier/issues/3366482