+ Start a Discussion
satyamsatyam 

How do we can escape appostrophy from account name in Custom lookup search window

Hi All,

 

I am having a custom lookup search page where i am showing the account name after search.So while selecting the account to fill the field its working perfectly for all have not contained appostrophy ,its creating problem with appostrophy account name,

 

My code which showing javascript error is

 

Below is my code where the error is coming.

 

Thanks in advanc for you help :-))))

 

<apex:outputLink value="javascript&colon;top.window.opener.lookupPick2('{!FormTag}','{!TextBox}_lkid','{!TextBox}','{!a.Id}','{!JSENCODE(a.name)}', false)" rendered="{!actualCustType!='Patner'}">{!a.Name}</apex:outputLink>

sfdcfoxsfdcfox

Use JSINHTMLENCODE instead. It works like JSENCODE but takes extra precautions against quotes and apostrophies by HTML escaping them.

satyamsatyam

Thanks for responce.

 

I tried  but still its not working :-(

 

Thanks.

dsangrdsangr

Hello,

 

Were you able to solve this issue, I am having the exact same problem?  It appears as though it's related to URLs, apex:outputLink value attribute or anchor tag href attribute, any \ turns to /.

 

Thanks,

 

Dawn