• Prashant Savanoor
  • NEWBIE
  • 0 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 1
    Replies

I'm trying to use a call to apex:iframe as below (this isn't the exact code but same situation)

 

<apex:iframe src="{!IFrameLink}" scrolling="false" frameborder="false" width="810" height="620"/>
 

and here is what my function looks like

    public String getIFrameLink() {
        if (searchString != null)
            return 'http://www.google.ca/search?hl=en&q='+searchString;
        else
            return 'javascript:void();';
    }

 

When I view source in IE7 the iframe is constructed like

<iframe src="http://www.google.ca/search?hl=en&amp;q=query+string" scrolling="false" frameborder="false" width="810" height="620"/>

 

This doesn't work because of the &amp; in the link.  Any suggestions on how to resolve this? I'd still like to have a blank iframe if the test value is empty