CodeIgniter xss_clean semicolon addings

When you use that perfect xss_clean function from CodeIgniter’s library to make your content more robust, sometimes you may face a strange content being updated in DB having “;” after “&” or before “=” .

That “;” is added by xss_clean, to make the link more robust, but if in your case it will add some malfunctioning in your system you’d better use something else in your validations like “htmlentities” :

$rules['link']                =     "required|trim|htmlentities";

For more information regarding that you can refer to CI forums. [thread1] [thread2]

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s