xssApi value isnt printing
Hi All,
I have a breadcrumb component When I check the HTML code of the breadcrumb on page, there is some JSP logic is shown and not translated correctly.

<sly data-sly-test="${! currentpage.properties.breadcrumbsHide}">
<sly data-sly-use.crumb="com.atlascopco.aem.ac_commons.core.components.BreadCrumb">
<sly data-sly-test="${!crumb.emptyBreadcrumb}">
<div class="c-row">
<div class="c-breadcrumb">
<ul class="o-list c-breadcrumb__list" data-sly-list.breadCrumb="${crumb.breadCrumbEntries}">
<li class="c-breadcrumb__item">
<a href="${breadCrumb}.html"
onclick="CQ_Analytics.record({event:'followBreadcrumb',values: { breadcrumbPath: '<%=xssAPI.getValidHref(sample.getPath())%>' },collect: false,options: { obj: this },componentPath: '<%=resource.getResourceType()%>'})"
class="c-breadcrumb__link">${crumb.breadCrumbEntries[breadCrumb]}</a>
</li>
<li data-sly-test="${breadCrumbList.last}" class="c-breadcrumb__item">${crumb.text}</li>
</ul>
</div>
</div>
</sly>
</sly>
</sly>
I tried adding @2941342='scriptString', 'html', 'text' on <%=xssAPI.getValidHref(sample.getPath())%>' } but nothing works.
When I check sample.getPath() on the console I am getting sample not defined.