Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'The clean() function' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
The clean() function
Authored by: hypert on Jun 29, '05 09:47:36PM
Aaarrgghh!

The characters in clean() keep getting goofed up. In the first replacement, the first ampersand you see should be the HTML representation of an ampersand (which is an ampersand followed by the characters amp;). The second replacement is to replace the HTML representation of a single-quote. So, the first single-quote (inside the double quotes) is actually supposed to be an ampersand followed by #39;.

This will replace the goofy HTML representation of ampersands and single-quotes with the "normal" (ASCII) representations. You can add more to clean() if you come across them, but those are the only ones I've seen so far.

[ Reply to This | # ]