By twlintw on
Hi all,
I've been playing with filter for a bit and finally got the hang of it, but somehow it does not save to database as I expected it would.
I have a filter that censors some of the words in the blogs, it worked fine when the blog is displaying on the site, but I have a Trigger that sends email notification to the author, somehow it sends original uncensored body, which defeats the purpose of putting a censor as it does not modify the database entry.
does anyone know any ways to work around it, so I can prevent people from seeing those censored words?
thank you all in advance.
Comments
*All* filters work when the
*All* filters work when the content is rendered, and leave the original content untouched.
The issue is that the filter is not applied to the 'action'.
However, I've not used triggers and actions yet, so I can't offer a solution.
If no-one is forthcoming with an answer, then I'd put it in as a feature request for D7.
Thanks for the reply, that
Thanks for the reply, that clears up why the original content was emailed with the notification.
I'll look into this a bit further and see if I can find some way to work around it.
I just realised something,
I just realised something, if I put the trigger at "Trigger: When either saving a new post or updating an existing post" stage, I get the original text, but if I put the trigger at "Trigger: When content is viewed by an authenticated user", it actually sends out filtered text.
Somehow I need to send the email as it is being entered into the database, not when it is being viewed later.
Does anyone have solution for this?