Jump to content

HTML/SQL Injection


gibigbig

Recommended Posts

I have recently downloaded FCK editor, but thats just a clientside editor (a fancy Textarea). I wish to prevent html and sql injections from it. Is there a function that can clean the input before storing it in the database?

 

I have disabled the following abilities from the editor:

  • adding links and anchors
  • viewing html source
  • adding plugin (flash)
  • adding forms and form elements

 

also i have these functions:

  function Valid_Input($data){ 
    list($data) = preg_split('/\r|\n|%0A|%0D|0x0A|0x0D/i',ltrim($data)); 
    return $data; 
  } 

and

function clean($text)
{
$text = htmlspecialchars($text, ENT_QUOTES);
    return ($text); //output clean text
} 

 

will this be enough? If not, can you give me a function that will.

 

Link to comment
https://forums.phpfreaks.com/topic/206880-htmlsql-injection/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.