images within list elements show in kupu editor, but not in forms/preview/public preview

Bug #101271 reported by Simeon Scott
4
Affects Status Importance Assigned to Milestone
Silva
Invalid
Medium
Andy Altepeter

Bug Description

<span class="error"></span> is printed in the place where an image should occur
in the source code of output html pages from preview, public preview, forms
editor, however in Kupu editor screen, the images display correctly.

This seems to happen if the image ends up within a <p ...> ... </p> block in the
list. The image seems to be displayed OK if placed after </p> eg

<ul type="disc"><li><p class="normal">testy test</p><img src="savekupu2.png"
target="_self" alignment="" title=""></li></ul>

<ul type="disc"><li><p class="normal">testy test<br><img src="savekupu2.png"
target="_self" alignment="" title=""></p></li></ul>

The second list image won't display, while the first will.

I'm not sure if the unacceptable lists were generated by Kupu or by my own
hand-editing of Kupu code. Will endeavour to determine this over time if a
cause/solution does not become obvious to you.

Revision history for this message
Clemens Robbenhaar (crobbenhaar) wrote :

The cause of the bug is that only a restricted set of HTML-elements
is allowed in paragraphs when rendered via the public view of Silva.
(Note that I do not speak of the HTML standard, but about what Silva does ;-)

Image are not "allowed" in paragraphs. Either kupu should have this restriction
either, or the public renderer must be able to handle images inside paragraphs.
Sure this breaks the forms editor, unless soemone has an idea how to show images
in textareas ;-)

Erm, maybe one can allow a simplisitc <img src=".."> markup here either.

Revision history for this message
Guido Wesdorp (guido-infrae) wrote :

Actually this problem *should* be solved by the transformations (that filter the
data before it's stored in Silva), if they encounter an image inside a <p> tag
they *should* move it to a place where images are allowed, it seems that there's
some bug in there.

I'll check it out.

Revision history for this message
Simeon Scott (simmo) wrote :

On Wed, Nov 17, 2004 at 11:12:19AM +0000, Clemens Klein-Robbenhaar wrote:
>
> Clemens Klein-Robbenhaar <email address hidden> added the comment:
>
> The cause of the bug is that only a restricted set of HTML-elements
> is allowed in paragraphs when rendered via the public view of Silva.
> (Note that I do not speak of the HTML standard, but about what Silva does ;-)
>
> Image are not "allowed" in paragraphs. Either kupu should have this restriction
> either, or the public renderer must be able to handle images inside paragraphs.
> Sure this breaks the forms editor, unless soemone has an idea how to show images
> in textareas ;-)
>
> Erm, maybe one can allow a simplisitc <img src=".."> markup here either.

Ah, I see the reason :) Yes, I think just plonking the image reference
into the text would be ok, but perhaps using structured text markup
style, not html? since bold etc is all already done by forms users using
structured text markup, it's what they would expect.

Simeon

>
> ----------
> status: unread -> chatting
>
> _____________________________________________
> Silva issue tracker <email address hidden>
> <http://issues.infrae.com/silva/issue1156>
> _____________________________________________

Changed in silva:
assignee: nobody → aaltepet
Revision history for this message
Andy Altepeter (aaltepet) wrote :

This doesn't happen in the Silva trunk, so the kupu transforms must have been fixed in the meanwhile. The behavior: if you place the image tag within a paragraph that is in a list item (using the source editor), then click "Save", the transforms move the image outside of the paragraph.

Changed in silva:
status: Confirmed → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.