When there are special characters in linkText attribute, Java application using 2013 Tridion renders the link text and link without issues. When the same pageLink is being rendered in 8.5 Tridion, the link in java application is not rendered. There are no errors in micro service logs.
xhtml fragement with special characters in linkText field
<tridion:PageLink pageURI="tcm:10-1008-64" linkText="<span ></span> <span class="total">test</span>" textOnFail="true" anchor="" linkAttributes=" id="dashboardTestLink" data-rackvalue="Link - test""/>
Java code snippet
PageLink myPageLink = new PageLink(publicationId);
String strURL = getLink(myPageLink, pageURI, linkText, linkAttributes, textOnFail, parameters);
Using postman, we get back response for a
Request
https://{contentmicroservice server name}client/v4/content.svc/GetPageLinkFunctionImport(PublicationId='10',TargetPageId='1008',Anchor='',LinkTagAttributes='',LinkText='<span></span><span class="total">Test</span>',ShowTextOnFail='true')
Response
<content type="application/xml">
<metadata:properties>
<data:LinkUUID>22c10e4c-88c2-8aeff034c23f</data:LinkUUID>
<data:Url>/test/Page.xhtml</data:Url>
<data:Anchor></data:Anchor>
<data:Parameters metadata:null="true"></data:Parameters>
<data:TargetURI>tcm:10-1008-64</data:TargetURI>
<data:Text>&lt;span&gt;&lt;/span&gt;&lt;span class=&quot;total&quot;&gt;Test&lt;/span&gt;</data:Text>
<data:Attributes></data:Attributes>
<data:TextOnFail metadata:type="Boolean">true</data:TextOnFail>
</metadata:properties>
</content>
Question Can this be an issue with the Tridion API used in java application, fetching data with encoded special characters?