XHTML Transitional Validation Problems

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
Kalar
Forum Newbie
Posts: 9
Joined: Sat Jul 27, 2002 2:04 am
Location: Saint John, Canada

XHTML Transitional Validation Problems

Post by Kalar »

Here's my problem:

I have a very simple webpage to test some validation issues. It essentially has a link on it. This link points to another website. The URL has ampersands in it, which I know are causing the validation problem.

How do I fix it?

I know that if I can convert all of the ampersands to their character reference, &, then it'll work fine. But, how do you guys manage to do this without having an ereg() convert ALL ampersands? I've tried a simple $content = ereg_replace('&', '&', $content); conversion, but it ends up hitting all of character references, such as ", changing them all into ".

Has anyone had this problem before? It appears that because of the ampersands, XHTML simply will NOT allow for linking to GET-calls on other scripts.

BTW: if you'd like to see the page I'm talking about, then check out: http://www.filminitiative.com/test.html
User avatar
Takuma
Forum Regular
Posts: 931
Joined: Sun Aug 04, 2002 10:24 am
Location: UK
Contact:

Post by Takuma »

Code: Select all

<?php
str_replace("&","&",$string);
?>
Try it!
Post Reply