Not sure which characters should I can (or cannot) write in title and body fields, that's why input filters exist. But I believe there's a feature they should have by default:
There is a little and strange character called " " (in fact, you can't see it but i'ts there). You can get it executing
String.fromCharCode(8232);
in firebug console. The unicode number is U+2028, you can see the reference at http://www.fileformat.info/info/unicode/char/2028/index.htm.
In a default installation, drupal allows you to put that character when posting a node. Is almost inoffensive, except when retrieving data through ajax, in which case you'll get an "Unterminated String Literal" error, because javascript takes the char like a line break in the middle of your content.
The way I got this error was "An error occurred at /drupal/admin/build/views/ajax/preview/". The worst part, ajax response and everything else seem to be ok, is a little hard to find it out since you can't see it.
Provisional fix? Install "Custom filter" module, and create a filter with the following rule:
Search pattern: /
/
(copy and paste)
Replacement string:
(nothing)
Then enable it in your input filters. If you're using fckeditor, ckeditor, etc, don't forget to configure them for your new filter.
More bad news, this doesn't work for node titles. If you want to clean all your current database from that char, find and replace with mysql.
Comments