Reputation: 14914
I have a page that contains an iFrame point to a URL with parameters. The URL look like: http://www.myurl.com/page.aspx?parameter1=A¶meter2=B
When it is edited in some of these WYSIWYG the &
is changed to &
and that work fine. but rarely my log told me that my page.aspx
doesn't find the second parameter... if I copy and paste the URL with &
in the browser http://www.myurl.com/page.aspx?parameter1=A&parameter2=B
doesn't work that only work inside of the iFrame...
&
&
well. &
in the iFrame, if so which ones??? Any other
idea that suggestion???Upvotes: 2
Views: 5342
Reputation: 432
Also consider using double quotes around the parameter, e.g. instead of:
src = 'http://blahblah.com'
do
src = "http://blahblah.com"
When I changed that, I didn't need to escape the ampersand anymore
Upvotes: 2
Reputation: 1127
&
is used to escape an ampersand (&
) in XML. You should always use &
instead of just &
in attributes such as href
. When pasting it in your browser's address bar, you should't use &
simply because it doesn't do any form of XML parsing.
Upvotes: 2