We are getting VfUnescapeEl error in our sfdx report on the following line :
<a href="{!LEFT($CurrentPage.URL,FIND('/',$CurrentPage.URL,9))}{{x.Id}}">...</a>
here, x.id will be in alphanumeric form, just simple text.
Have tried putting JSENCODE in the following ways :
<a href="{!JSENCODE(LEFT($CurrentPage.URL,FIND('/',$CurrentPage.URL,9))}{{x.Id}}">...</a>
<a href="{!LEFT(JSENCODE($CurrentPage.URL,FIND('/',$CurrentPage.URL,9)))}{{x.Id}}">...</a>
<a href="{!LEFT($CurrentPage.URL,FIND(JSENCODE('/'),$CurrentPage.URL,9))}{{x.Id}}">...</a>
But none of them seems to work and pmd still gives the error.
Please suggest how can we resolve this error.