Forum: Ruby on Rails Creating a string array from encoded form input

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
8c7a98649cdbbdf39eeed17ca9bdbbd3?d=identicon&s=25 josh.charles (Guest)
on 2005-11-27 03:03
(Received via mailing list)

I'm continuing my work on integrating FCKEditor into Rails, focusing
on getting the serverside spell checking to work.  I've ran into a bit
of a snag, however, and after spending quite some time on this, I
don't know how to go further.  The javascript submits the following
sort of text to the server to spell check:

</example> (Line breaks added in email for formatting purposes)

I've tried running regular expressions to remove all of the extra
stuff, but that quickly becomes an ugly mess because the html is sent
as well.  Therefore, I would have the original text as well as the
html text to weed out.  I was able to get around this, but then I
discovered that it would leave the "nbsp" from the html encoding for a
non breaking space.  I can only assume that other html special
characters would be left behind as well.

Looking at the provided php source from FCKEditor, it looks as if php
can put this automatically into an array through some hidden magic of
some sort.  I'm at my wits end in trying to find a solution to this
problem.  Does anyone have any idea how I might be able to make an
array out of this?

The other option I have is even uglier in the page itself, but uses
the great ajax spellchecker ttutorial posted by Dee Zsombor.  I could
try to hide the fckeditor, copy the text only into a ttext box, and
then run the spell checker on that.  I'm not sure if that would work,
though, becuase of the extensive modifications to the DOM that
FCKEditor creates.  My preferred solutions is to figure out how to get
that text into an array I can feed into aspell for checking

Any help will be greatly appreciatted.  This work, once completed,
will be added to my FCKEditor integration How-to.

This topic is locked and can not be replied to.