Hi,

I am using CKEditor (FCK) and I want to filter certain things from being used by users like (.com, <, >) symbols and words. Is there any plugin available for this or in which way i can do this? any help please..

thanks
rave

Recommended Answers

All 5 Replies

have you tried using an array in a str_replace command?

$string = 'test.com/%20\\\';
$array = array ('.com', '%', '\', '/');
$string = str_replace($array, '', $string;

This should just return the word test. I havent tried it but pretty sure you could use that.

sorry, test20

Member Avatar for diafol

Do you need this as interactive functionality (before post) or server-side after posting? The former will rely on JS, the latter on PHP. However JS can be circumvented, so a JS functionality would also require PHP backup.

you could control it all either way. I only know for certain how to do it in PHP.

just before you commit you should use some if statements to perhaps output the new string and then get the user to say they are happy with it

Member Avatar for diafol

CKEditor uses JS, so if you're looking to embed this functionality into the interface, I assume it will be JS. BUT, as mentioned, if you want to ensure CLEAN input to the DB, you need to use some string or preg* functions.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.