Closed (fixed)
Project:
HTML Purifier
Version:
6.x-2.4
Component:
User interface
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
3 Dec 2010 at 18:46 UTC
Updated:
7 May 2012 at 11:55 UTC
I would like to be able to embed a PayPal donations button, but I can't get it to work. I found this post where some possibilities are mentioned: http://stackoverflow.com/questions/3189396/whitelist-forms-in-html-purif...
I was able to allow HTML.Trusted using the HTML Purifier (advanced) input filter, but to no avail. Could somebody give me a hint?
Comments
Comment #1
ezyang commentedDid you clear your cache after making the configuration change? That's the usual issue, see #923262: Configuration change does not clear the cache (One easy way to do testing is to tweak the content under test a little bit, so Drupal is forced to rerun the configuration filter.)
Comment #3
AndrewPurdy commentedThe easiest way I found to add a PayPal donation button is as follows:
1) Create a block for the donations and position it as necessary, e.g. Right Sidebar
2) In the 'Block Body' of the block add the Button code as generated by PayPal and make the 'Input Format' Full HTML
3) In Configuration/Input Formats I enabled 'Full HTML' so that it could be used by the various Roles I had set up.
Comment #4
yan commented#1
Yes, caches have been cleared. But the button still doesn't work.
#3
Are you sure that you are using HTML Purifier as an input filter in your Full HTML settings? It seems to me, you're talking about something different (no offense!).
Comment #5
ezyang commentedCan you post the precise code that is submitted to Drupal? Can you post the code that is given to HTML Purifier? (you can do this by intercepting the call to HTML Purifier and having it print out the contents, before and after.)
Comment #6
yan commentedHow would I do that "interception"?
Comment #7
heddnHere's a walkthrough that *should* get this working. These instructions can really apply to any random HTML loaded into a block in both D6 & D7.
Filter HTML Tags
- Strip disallowed tags radio option
- Allowed html tags for paypal's buttons as a minimum:
<form> <img> <input>. If you are trying to post other than paypal's html content in the block, then the allowed tags will/may be different.HTML Purifier
-
HTML.Trusted = true-
URI.DisableExternalResources = falseThis allows paypal's logo image to be served up from their external domain. If you are hosting the image on your server then no need for this setting.Comment #8
heddnI just learned something new about HTML Purifier that I thought I would add to my previous posting. Instead of using the drupal html filter, you can disable it and use html purifier's. See HTML.Allowed, HTML.AllowedAttributes, etc. http://htmlpurifier.org/live/configdoc/plain.html#HTML. It is much more powerful than Drupal's.