CustomLayout with substitutions truncates content

Hello,

I use CustomLayout to content in html, to embed images (Embedded) and internal links (buttons styled as links). I use span elements in the html (rather than div) so the links can be part of the text.

When the CustomLayout is displayed in the browser, its content is truncated to various degrees depending on the element being substituted and the browser used. Below I include code immediately around the image or the link:

  1. Displaying images: any content following the image is omitted in IE8, but display is fine under Firefox.

Template code:

<p><span location="image_0" text="file=Penguins.jpg^width=884^height=568"/></p>

Code after substitution (debug):

<p><img src="Penguins.jpg" width="884" height="568"/></p>

Source from IE8:

<P>
<SPAN text="file=Penguins.jpg^width=884^height=568" location="image_0">
<DIV style="WIDTH: 1024px; HEIGHT: 768px" class="v-embedded v-embedded-borderless borderless v-embedded-image" __eventBits="241" tkPid="PID465">
<IMG src="[...]
/Penguins.jpg" width="1024" height="768" __eventBits="32768" __gwtLastUnhandledEvent="load" />
</DIV>
</SPAN>
</P>
[no more text is displayed]

Source from Firefox:

<p>
<span text="file=Penguins.jpg^width=884^height=568" location="image_0" style="">
<div class="v-embedded v-embedded-borderless borderless v-embedded-image" style="width: 1024px; height: 768px;">
<img src="[...]
/Penguins.jpg">
</div>
</span>
</p>
[rest of the text is displayed]

  1. Displaying buttons/links:
  • under IE8: any content following the link is omitted in IE8.
  • Under Firefox: if the link is displayed within a paragraph, content within the same paragraph following the link is omitted, while content outside of that paragraph (after the closing paragraph tag) is fine.

Template code:

<p>Voir aussi <button name="GetEntityDetail_0" text="Authority^70/034"/> (Établissement aéronautique national).</p>
Et cela conclut etc.

Code after substitution (debug):

<p>Voir aussi <span location="link_0" text="Authority^70/034"/> (Établissement aéronautique national).</p>
Et cela conclut etc.

Source from IE8:

<P>
Voir aussi <SPAN text="Authority^70/034" location="link_0">
<DIV class="v-button v-button-link link" role="button" __eventBits="7165" tkPid="PID710">
<SPAN class="v-button-wrap"><SPAN class="v-button-caption">Authority 70/034</SPAN></SPAN>
</DIV>
</SPAN>
</P>

Source from Firefox:

<p>
Voir‌ aussi‌ 
<span text="Authority^70/034" location="link_0" style="">
<div class="v-button v-button-link link" tabindex="0" role="button">
<span class="v-button-wrap">
<span class="v-button-caption">Authority‌ 70/034</span>
</span>
</div>
</span>
</p>
Et‌ cela conclut‌ etc.

Please, can anyone suggest what might be wrong here?

Normand Fortier

The problem is solved by making sure the “span” tags have separate closing tags, as opposed to a self-closing span tag.

Normand Fortier