If an image title contains extended unicode characters it causes the backend parser to return <p>"undefined"</p> as code for all images in a node.

In my case it was the unicode character #2028 that caused the error. I've attached the JSON data to this issue. The character sits between the two words "textilähnliche Oberfläche" right after the blank (ID 171).

After removing the offending character manually in the database everything went back to normal for this node. The tricky thing about detecting this is, that most browsers don't display this character at all, there's no visual spacing or any other indication. Just Google Chrome displays it as a missing character in the font, which could be even considered as a Chrome bug (since it causes a visual glitch) but was very helpful in my case to get the hint where the problem lies.

Initially it happened because the text for the image title was exported from an Indesign document to a Word document and then into Drupal with TinyMCE.

Comments

eugenmayer’s picture

Well this should be related to the drupal_to_js bug. I will reimplement this for wysiwyg_imageupload

eugenmayer’s picture

should be related to http://drupal.org/node/797638

eugenmayer’s picture

Status: Active » Needs review

http://github.com/EugenMayer/wysiwyg_imageupload/commit/02c6968fa1e7c37d...

should be fixed with that commit. Could you test this? Thank you

troyer’s picture

Status: Needs review » Reviewed & tested by the community

Did a test, extended unicode character inserted, backend still works as expected without any flaws, unicode character can still be retrieved after saving so the new function preserves all input as expected.

eugenmayer’s picture

Status: Reviewed & tested by the community » Fixed

Thats what i call teamwork! Thank you very much, this one goes on your account

eugenmayer’s picture

Status: Fixed » Closed (fixed)

released in rc8