Closed (won't fix)
Project:
Simplenews
Version:
6.x-2.0-alpha5
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
17 Nov 2007 at 08:30 UTC
Updated:
5 Aug 2013 at 14:18 UTC
Jump to comment: Most recent file
Comments
Comment #1
sutharsan commentedFilters are applied to node body also on node being send by email. It should be possible to make this exception but not by Simplenews only by the applicable filter.
Comment #2
osopolarI have the same issue and was looking for how to fix it. I don't think that this could be done by the filter itself because simple news have to provide some informations to the hook_filter. How would the filter know that it is filtering in mail context and not node view?
I propose to add the possibility to choose a filter for the mail send by simple news. The settings (in admin/settings/simplenews/newsletter) should contain a selection field or all available filters options + one (default) called "use node's format". Now the developer can just create a filter to use for newsletter mails (which could be different to the newsletter node filter).
Comment #3
osopolarPatch for the in #2 described changes.
Created for Version 6.x-1.3 but will also work for current 6.x-2.x-dev.
Comment #4
miro_dietikerNote that as of Drupal features what you refer to is named "input filters".
This means we're choosing the format of input (input language / syntax).
Simplenews even introduces an own build type for the output. Thus it would allow build processes to detect the output channel.
The issue now is not simplenews implementation, but much more an architectural deficit of drupal. Namely the lack of context in filter processing. There already have been many many feature requests to fix this in core.
#226963: Context-aware text filters (provide more meta information to the filter system)
#696380: Pass node context to filters
#11225: Node context for filters
^^ note the date!
Ans also note that it has been delayed to 8.x due to the lack of pressure.
What you introduce is much more a workaround - not a clean implementation - which changes the meaning of filters. At least it's a feature request this time which happens to be subject of 6.x-2.x or 7.x.
Is it impossible to check for the build mode? We should look for a cleaner drupal-like implementation to be integrated.
Comment #5
osopolarInput filter means that the input has to run through that filter. Drupal is storing the input "as is" to the database (no filtering, only some sql escaping) and filters while preparing it for output.
I have seen that build type but I can't use it in the filter because it can't be used by the input filter because the filters are not context aware (#226963: Context-aware text filters (provide more meta information to the filter system)).
IMHO there won't be ever a fix for the filter issue in drupal 6.x. But I'd like to get this fixed for Simplenews 6.x.
As far as I can see you don't like the way I fixed it. I can't see in which way it changes the meaning of filters. It changes (extends) the way how filters are used, if the site developer wants -- therefore the default option is to use the nodes input filter (set in $node->format).
Comment #6
simon georges commentedAs this should not be handled by Simplenews core, and the issue has not been touched in more than 6 months, I'm closing it.
Comment #7
osopolarFixed: Patch in 3 did not work if anonymous has no right to use filter ... as this is ment for node creation I dropped it out. Now it works well.
Comment #8
vistree commentedHi, is there an equal path for drupal 7?