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.

1 Answer 1

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

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

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.