|
-
Jan 5th, 2002, 12:45 PM
#1
Thread Starter
PowerPoster
Ignoring HTML tags in PHP (resolved!)
I've got a textbox that users can enter search queries into, but if they are sneaky and enter html tags, it mucks up the results page.
How can I make tags come out as written rather than being processed by the browser, so if they type "<font color="#0000ff">hello</font>" it prints "<font color="#0000ff">hello</font>" rather than "hello"?
Last edited by chrisjk; Jan 5th, 2002 at 01:15 PM.
-
Jan 5th, 2002, 12:48 PM
#2
Member
How's about, if PHP has a Replace-like function, replacing every occurance of < with < and > with >?
-
Jan 5th, 2002, 12:51 PM
#3
Thread Starter
PowerPoster
good thinking batman
I forgot about those < and > things
-
Jan 5th, 2002, 12:56 PM
#4
Thread Starter
PowerPoster
-
Jan 5th, 2002, 12:57 PM
#5
Member
That user-contributed notes thing is way cool
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|