First char stripped when using numbers
joln - September 30, 2009 - 06:59
| Project: | Wordfilter |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | critical |
| Assigned: | Unassigned |
| Status: | closed |
| Issue tags: | wordfilter |
Description
First char stripped when using numbers. It removes the first number. When I put a space in front of the number it works.
IE.
-aar-|2009
outputs 009
it's the same with all numbers

#1
meaning that you have a wordfilter setup to replace the string '-aar-' with the number '2009'?
I want to verify that that is the case you have here.
Please provide any more detail you have so I can see what it is you are running into.
#2
Sorry for a late answer and thanks for a great plugin.
Now, back to my issue.
With clean install drupal 6.14 and with latest dev-module of wordfilter. No other than drupa standard modules are active.
When enter a replacement word as number, olle|2009 the first char of the number get stripped. When enter a "normal" replacement word, olle|test it works fine. It also works fine with a added space in fron of the number, olle| 2009.
No other filters is on, only the wordfilter filter is active.
Let me know if I can explan it futher or if this is enough info.
Attaching phpinfo
#3
Ok I think I can see why this is happening and from studying the PHP page for preg_replace() I think I have a fix. Can you try out the attached patch to see if it addresses your problem? Be sure to clear your cache when you try to view the node in question.
#4
Yes! Worked like a charm. Many thanks.
#5
http://drupal.org/cvs?commit=274040
#6
Automatically closed -- issue fixed for 2 weeks with no activity.