3

when following anchor tag containing <abbr> is resolved by link resolver , additonal </a> is added at the end which breaks the html.

Original html

<a tridion:href="tcm:xxx-xxxxx"  target='_self'>
  <span>this is a test  <abbr title="test">TEST</abbr> scenario</span>
</a>

Converted html

<a href="resolved url"  target='_self'></a>
  <span>this is a test  <abbr title="test">TEST</abbr> scenario</span>
</a>

The additional </a> breaks the html structure.If I remove the tag this html works fine.Please provide inputs to resolve this issue.

3

You can specify additional inline elements (such as abbr) to accept in your rich text fields in the following configuration file on the Content Manager server:

%TRIDION_HOME%\WebUI\Core\Controls\FormatArea\TcmXhtml\TcmXHTML.config

For example:

enter image description here

  • my bad, I assumed that if it is not an allowed attribute in Tridion, it is a non-standard html attribute. – Vipin Kothari Sep 18 '15 at 22:28
  • Thanks Jonathan for your suggestion.I am using sdl tridion 2011 sp1. I modified the changes suggested by you and restarted the cms component service and other tridion services present in the services.msc window. Still the "link resolver" adds the additional </a> after resolving the internal component link. I think there is some bug with the link resolver. Please let me know if I am missing something. – user3560198 Sep 21 '15 at 11:41
0

I don't know if this is related, but we've noticed that Tridion can do some odd things when resolving tags. For example, self-closing empty divs:

<div class="someClass"></div>

will resolve out as:

<div class="someClass" />

We get around this by putting a &nbsp; in the div. Not sure why Tridion should decide that divs can self-close, but it may be related to your issue. Sounds a bit simplistic, I know, but have you tried putting the code all on one line? Bit of a shot in the dark, but worth a try maybe?

  • 1
    It's because RTFs are processed as XML. XML doesn't distinguish between the two serialised forms so you have to ensure that the div isn't empty. It's not really Tridion's fault - after all XML is a pretty good choice for storing/processing an RTF - but the consequence is that we need to resort to this kind of hack. – Dominic Cronin Aug 1 '16 at 21:56
0

Another alternative is simply not to use the Link Resolver. For example, you could write your own link resolver, or just emit the TCDL for the link directly from your template. Of course, before choosing this option, you should consider whether the link resolver template's preview functionality is valuable in your situation.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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