[kupu-dev] nbsp tags disappear, breakin' paragraphs

Duncan Booth duncan.booth at suttoncourtenay.org.uk
Fri Feb 9 11:31:33 CET 2007


bernhard <g.bernhard at akbild.ac.at> wrote:

> hello again, kupu list!
> 
> i have another problem with kupu - i have made a button that inserts  
> an image into the dom tree usinng javascript. the html code that i  
> insert contains [&nbsp], because otherwise some elements of the code  
> are not selectable on clicks. when i click 'HTML' or save all the  
> [&nbsp] tags are being removed.

Interesting. It seems that non-breaking spaces are being lost when you use 
the HTML source view. If you enter &nbsp; in source view, go back to the 
wysiwyg view, and save the document then you still have a non-breaking 
space (although it is no longer stored as an entity escape so you have to 
examine a character dump to verify that this is the case).

I guess there's a bug somewhere. Probably I need to entity escape the 
source view which is a pity as I can't entity escape the text that Kupu 
saves because Plone has (or had? I haven't checked recently) buggy full-
text indexing which didn't understand html entities.

> another issue is that kupu seems to insert [p][br /][/p] sometimes  
> when return is pressed; can i prevent this, too?

Firefox? If you figure out a way to prevent Firefox inserting strange 
things when you hit return then I'll buy you several beers.



More information about the kupu-dev mailing list