tags:

views:

75

answers:

2

For example, I have a URL, that someone entered into a specific CMS form field, to display on the website: http://seneca.sunyconnect.suny.edu:4730/F/?request=79396&func=find-b&find_code=sys&local_base=her01pub

and it outputs the following html:

<a href="http://seneca.sunyconnect.suny.edu:4730/F/?request=79396&amp;func=find-b&amp;find_code=sys&amp;local_base=her01pub" title="The Sociology of Sports" rel="external">The Sociology of Sports</a>

It is not considered valid, with the warning message: unescaped & or unknown entity "&func", as well as another warning: unescaped & or unknown entity "&find_code"

I know func & find_code are elements being passed thru the URL, but is there a way to make it valid & still allow it to go to the correct destination?

+7  A: 

Just replace any unescaped ampersands (&) with &amp;

innaM
Here you have the normative reference: http://www.w3.org/TR/html401/appendix/notes.html#h-B.2.2
Boldewyn
+4  A: 

Use &amp;:

<a href="http://seneca.sunyconnect.suny.edu:4730/F/?request=79396&amp;amp;func=find-b&amp;amp;find_code=sys&amp;amp;local_base=her01pub" title="The Sociology of Sports" rel="external">The Sociology of Sports</a>

See Ampersands (&'s) in URLs for more information.

Grant Wagner