2

I am trying to put link under label which will scroll down to the section down in the VF page. I am getting an Error

Error Error: LeadDetail line 123, column 52: The entity name must immediately follow the '&' in the entity reference
Error Error: The entity name must immediately follow the '&' in the entity reference.

 <apex:pageblocksectionitem >
    <apex:outputText value="D & B Company Name \<a name="#detailList"\>more...\</a\>" escape="true"/>
    <apex:outputField value="{!RH_Lead__c.Company_Name1__c}"/>
</apex:pageblocksectionitem>

detailList is a section at the bottom.

2

Replace & with &amp; in the value attribute

EDIT: you need to replace all the reserved characters (&, <, > etc) with their named character entity reference ("escaped" values) in attributes, because the attributes are parsed - < needs to be &lt;

https://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references

|improve this answer|||||
  • Now getting The value of attribute "value" associated with an element type "apex:outputText" must not contain the '<' character. – SFDC shaikh May 3 '17 at 14:34
  • < needs to be &lt; – Brian Mansfield May 3 '17 at 14:35
  • Thanks Brian. And how to make it auto scroll to thebottom. – SFDC shaikh May 3 '17 at 14:42
  • That's a completely separate question, if you have another question you may ask it here: salesforce.stackexchange.com/questions/ask – Brian Mansfield May 3 '17 at 14:43

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.