Posted by BluesmanEP on August 12, 2008 at 6:38pm
| Project: | Mass Contact |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
Issue Summary
Is there a way to force Mass Contact to use a specific input filter? It's my understanding that checking the HTML box, applies the default input filter, but there's no way to specify a different one. I don't want to be able to select different filters, I just want to force it to always use a specific filter. Is this possible?
Thanks,
Evan
Comments
#1
I don't know. I imagine there would be a way to do it, even if it's contrived, but I'll have to investigate to see if it's possible and how much effort it will be.
#2
Thanks very much for looking into this.
Unfortunately, I won't be much help in the coding department, but I'm happy to test and provide feedback on any patches etc. you may come up with.
Thanks again, and let me know how I can be of help.
Evan
#3
Its really bad that I have to force an insecure input filter as standard for Mass Contact to get correct html mails. The appended and prepended code shouldn't be filtered or it should be possible to disable it.
#4
I've added the ability to specify the input formats here: http://drupal.org/cvs?commit=365884
This change is not included in the brand new 1.0 release, as it was quite a bit more work and included more areas of the code than I expected, so I kind of wanted to keep it separate to make sure I didn't cause any problems.
Here's what I added:
Please test it and let me know if the changes work for you and if they're what you're looking for.
#5
Thanks, that sounds great. I'll test it next week.
#6
At my first tests it works as expected.
#7
It does not respect the WYSIWYG module. (it does not load the wysiwyg editor, no firebug console errors, worked just fine in previous mass_contact versions).
If I have the time, I will look into the code and try and find the culprit...
#8
Pretty easy patch, restoring div wrapper and nesting body + filters in same array.
#9
The div wrapper above probably is optional, but is consistent with drupal core.
Above is only a partial fix: still not fixed for situations where one isn't allowed to override html AND isn't allowed to change filter format.
#10
Which client editor are you using with the Wysiwyg module?
#11
tiny_mce 3.3.6
#12
I fixed it for all situations now. (it has nothing to do with tiny_mce, more with the implementation of wysiwyg module itself)
I replaced some code, but most noticably the code below. It didn't seem to have any consequences, because even though you're saying you're saving the setting for later use, I couldn't find it in the _submit function.
- // The user is not allowed, so save the setting for later use.- $form['html_format'] = array(
- '#type' => 'value',
- '#value' => $html_filter_format,
- );
Also, the next piece of code made me go o.O (as in: it worked...). I always thought private functions couldn't be used outside the module they were defined in..
+ $tips = _filter_tips($html_filter_format, FALSE);All of the work in the patch is basically making sure the form array is back to the way core formats it, as wysiwyg module requires this array formatting for correctly hooking in.
Also changed a description to follow core text more closely.
#13
This should be fixed here: http://drupal.org/cvs?commit=433560.
If not, please reopen with more information.
#14
Automatically closed -- issue fixed for 2 weeks with no activity.