I have problem in SDL Tridion 2013 rich text editor for Component, since it automatically convert an iframe
tag to be self-close:
from <iframe></iframe>
to <iframe/>
I have looked for other similar cases but none of the solution works for me. Technically, the way is to make sure that there is something in between the opening tag and closing tag to prevent it to self-close.
Any proposed way to solve this?
Added: my current Filtering XSLT for the Component
<stylesheet xmlns="http://www.w3.org/1999/XSL/Transform" version="1.0">
<output omit-xml-declaration="yes" method="xml" cdata-section-elements="script"></output>
<template match="/ | node() | @*">
<copy>
<apply-templates select="node() | @*"></apply-templates>
</copy>
</template>
<template match="iframe">
<element name="iframe">
<apply-templates select="*"></apply-templates>
</element>
</template>
<template match="*[ (self::br or self::p or self::div) and normalize-space(translate(., ' ', '')) = '' and not(@*) and not(processing-instruction()) and not(comment()) and not(*[not(self::br) or @* or * or node()]) and not(following::node()[not( (self::text() or self::br or self::p or self::div) and normalize-space(translate(., ' ', '')) = '' and not(@*) and not(processing-instruction()) and not(comment()) and not(*[not(self::br) or @* or * or node()]) )]) ]">
<!-- ignore all paragraphs and line-breaks at the end that have nothing but (non-breaking) spaces and line breaks -->
</template>
<template match="br[parent::div and not(preceding-sibling::node()) and not(following-sibling::node())]">
<!-- Chrome generates <div><br/></div>. Renders differently in different browsers. Replace it with a non-breaking space -->
<text> </text>
</template>
</stylesheet>