When you switch to 'design tab' and press enter and go to the 'source tab' all <br/> are translated back to <br> and this seems to be invalid HTML and we are unable to save the Component.

It happens to all rich-text fields for all the Components.

We migrated from 8.1 to 8.5 to 9.5. XSLT did not change, and it actually uses the default XSLT that came with the installation no there is not customization done.

  • when you say you did upgrade , was it from 8.1.1 to 8.5 and from 8.5 to 9.5. i have pasted the Filter below , try to compare and see if you find any difference , also let us know what browser you are using.
    – Anand N S
    Jan 14, 2021 at 19:11

2 Answers 2


Please can you try with the following filter try to edit one of the rich text schema and compare the filter option

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
        <xsl:output omit-xml-declaration="yes" method="xml" cdata-section-elements="script"></xsl:output>
        <xsl:template match="/ | node() | @*">
            <xsl:apply-templates select="node() | @*"></xsl:apply-templates>
        <xsl: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 -->
        <xsl: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 -->
          <xsl:text> </xsl:text>
        <!-- remove disallowed elements but keep its children -->
        <xsl:template match="font">
        <!-- remove all style attributes except those for a table and its cells and to allow underline -->
        <xsl:template match="*[not(local-name() = &apos;table&apos; or local-name() = &apos;tr&apos; or local-name() = &apos;th&apos; or local-name() = &apos;td&apos; or local-name() = &apos;col&apos;)]/@style"></xsl:template>
        <xsl:template match="span/@style">
          <xsl:if test="contains(.,&apos;text-decoration&apos;)">
        <!-- remove rowspan and collspan when set to 1 -->
        <xsl:template match="@colspan[.=&apos;1&apos;] | @rowspan[.=&apos;1&apos;]"></xsl:template>
        <!-- remove well known Microsoft Word classes -->
        <xsl:template match="@class[starts-with(., &apos;Mso&apos;)] | @class[starts-with(., &apos;mso&apos;)]"></xsl:template>
        <!-- remove conditional comments that Microsoft Word uses -->
        <xsl:template match="comment()[contains(., &apos;if&apos;)] | comment()[contains(., &apos;endif&apos;)]"></xsl:template>
  • sorry to say, but this dit not help. same happens as soon i hit enter in the Design tab all < br / > become < br > again and this results in the component not to be saved. if i change it back to < br /> in the source tab then it saves. when i then swap between design and source i can still save the component. But as soon as i hit enter again in the Design Tab. all the < br / > become < br > again
    – Mike
    Jan 15, 2021 at 7:42
  • when i change something no matter what in the \Tridion\web\WebUI\Core\Controls\FormatArea\TcmXhtml\TcmXHTML.config and save then reboot the machine. all is working. (using the default XSLT) but for some reason after a while, the problem comes back. so it seems related to Tidy object.
    – Mike
    Jan 15, 2021 at 8:41
  • Mike , why would you change any thing on the TcmXHTML.config , please let me know what did you change.
    – Anand N S
    Jan 15, 2021 at 8:56
  • Mike , i just did a quick test on Design tab , just press enter key "<p><br/></p>" i see this under Source Tab and able to Save
    – Anand N S
    Jan 15, 2021 at 9:01
  • It's not that i want to change any thing, i just trying to find the source of the problem. and see what options are there> api.html-tidy.org/tidy/quickref_5.4.0.html#MarkupHeader as for the enter, thats what it should do indeed but for me it becomes "<p><br></p>" so it keeps changing to <br> after the change (enter in the config file and save) reboot it works. but as mention, it only lasts for a view day and then the problem is back. i have no idea why this is happening or where it's coming from. but seems a tidy xhtml issue.
    – Mike
    Jan 15, 2021 at 9:08

The problem happens because of a cleanup script that stops the com+ "Tridion Sites Content Manager" and then deletes some log files from the system. Then it starts the com+ again. but the Running Processes under the component Services is not recycled. When I either reboot the server or manually recycle the problem is gone. Now I still have no clue on why this would result in Tidy acting like it does. changing <br/> to <br> other than it simply does. So basically now after the cleanup's I run a server reboot. but I would rather have a more solid solution. And yes the com+ needs to be stoped else it won't remove all files that need to to be removed.


$tridion_path = "e:\SDL\Tridion Sites\log","e:\SDL\Tridion Sites\Temp","e:\SDL\Tridion Sites\log\ImportExport","e:\SDL\Tridion Sites\web\Preview","c:\Temp","e:\temp","e:\sdl\tridion sites\bin\transactions","e:\sdl\tridion sites\web\WebUI\WebRoot\Upload","C:\ProgramData\SDL\Upload"

Stop-Service -DisplayName Tridion* -force
Stop-Process -processname TcmTemplate* -force

$comAdmin = New-Object -com ("COMAdmin.COMAdminCatalog.1")
$comAdmin.ShutdownApplication("Tridion Sites Content Manager")

foreach($file in $tridion_path)
    dir $file -recurse | 
    where { ((get-date)-$_.creationTime).days -gt -7 } | 
    remove-item -force -recurse

Start-Service -DisplayName Tridion*
$comAdmin = New-Object -com ("COMAdmin.COMAdminCatalog.1")
$comAdmin.StartApplication("Tridion Sites Content Manager")


  • Mike , thanks for sharing the solution , can you please mark your answer if that was the solution.
    – Anand N S
    Mar 8, 2021 at 20:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.