I managed to isolate my problem with the filter down to the use of the FCK Editor. If it is running, no matter how the CSV area is formatted, it doesn't seem to get parsed. Presumably, this is because FCK editor is not sending unformatted line breaks to the filter... Can the filter interpret HTML line breaks as well? I think that would make it compatible with the FCK editor.
Other than that - fine work! For an unmodified text area box, the filter works beautifully!
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | csvfilter-brtags_0.patch | 496 bytes | ezheidtmann |
| #1 | csvfilter-brtags.patch | 466 bytes | ezheidtmann |
| csv-parsing-problem.png | 23.81 KB | Lucas Gunn |
Comments
Comment #1
ezheidtmann commentedHere's a patch that should allow the filter to work with the output from fckeditor. It is untested.
Please test this patch by 1) applying the changes to your installation, 2) checking to see if the problem is solved, and 3) testing other situations, looking for problems this patch might have introduced.
Comment #2
Lucas Gunn commentedHi Clyde,
Thanks for the quick response! Fortunately, it doesn't appear to have introduced any new bugs, however, it still doesn't appear to work from FCK editor boxes. Now I'm stumped. Will follow-up if I either figure out what is causing it, or figure it out...
Thanks.
Comment #3
Lucas Gunn commentedChecking through your code, it looks like (please go easy on me, fairly new coder) you are just replacing
with '' - is that right. If so, I think the filter might be looking for text level line endings - in fact, CSVfilter may not be successfully parsing the text from FCK editor, as page output the source for a submitted CSV chunk still looks like this:
[CSV sep=,]
1,2,3,4,5,6,7,8, , 9
9,8,7,6,5,4,3,2, ,1
1,2,3,4,5,6,7,8, , 9
9,8,7,6,5,4,3,2, ,1
[/CSV]
Any thoughts?
Comment #4
ezheidtmann commentedMy patch removes the
<br />tags after splitting on newline characters. The newline characters must be there (regardless of the presence of br-tags) for the filter to work.This new patch tackles it another way: it assumes that fckeditor does not insert newlines. Try this one out. Also double-check your filter settings: make sure that csvfilter is actually enabled for the filter you are using with fckeditor.
Comment #5
Lucas Gunn commentedNice work - that seems to have nailed it! Thanks for your help!
Comment #6
ezheidtmann commentedThat's good to hear.
With the patch applied, does it still work with csv tables written without fckeditor? I'm concerned that my logic for choosing which to split on is incorrect.
Comment #7
Lucas Gunn commentedAppears to work fine in a text box without FCK editor as well. Well done!
Comment #8
ezheidtmann commentedOk then. I'll mark this as patch.
Comment #9
axel commentedThanks for patch, clydefrog! Patch applied, seems to work ok.
Comment #10
(not verified) commented