1

Tridion 2011 SP1 と Firefox 16.0.2、Internet Explorer 8、Internet Explorer 9、Chrome 23.0.1271.95 を使用しています。

いずれかのブラウザーでコンポーネントを開き、Designリッチ テキスト フィールドのビューですべてのテキストを削除すると (削除とバックスペースを複数回押す)、Sourceビューにさまざまなタグが残ります。これらはブラウザによって異なります。

  • ファイアフォックス :<br />
  • クロム:<p><br /></p>
  • IE8:<p></p>
  • IE9:<p></p>

ホット フィックスのリストを確認しましたが、関連するものはありません。

何か案は?

4

1 に答える 1

4

これはバグのようで、SDL カスタマー サポートに報告する必要があります。IE と Chrome と FF で動作が違うのですか?

サポートがホット フィックスを提供できない限り、唯一のオプションは、フィルタリング XSLT を使用して (フランクが提案したように) 唯一の BR を除外することだと思います。新しいリッチ テキスト フィールドを作成するときに使用される既定の XSLT フィルターには、以下に示すように、このフィルターが含まれています (最後の<template>ノード)。

<stylesheet version="1.0" xmlns="http://www.w3.org/1999/XSL/Transform">
    <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="*[      (self::br or self::p or self::div)     and      normalize-space(translate(., &apos; &apos;, &apos;&apos;)) = &apos;&apos;     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(., &apos; &apos;, &apos;&apos;)) = &apos;&apos;        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>
于 2012-11-15T13:11:16.490 に答える