Brad
Brad

Reputation: 12262

invalid a href URL's

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&func=find-b&find_code=sys&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?

Upvotes: 2

Views: 1449

Answers (2)

Grant Wagner
Grant Wagner

Reputation: 25931

Use &amp;:

<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>

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

Upvotes: 5

innaM
innaM

Reputation: 47829

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

Upvotes: 7

Related Questions