Found a really nice and simple article on URL rewriting using .htaccess. Thought of sharing it :)
Here is it:-
http://www.sicanstudios.com/how-to-remove-php-html-htm-extensions-with-htaccess/
Monday, June 6, 2011
Monday, January 10, 2011
How to check if script tags are entered in a field
jQuery.validator.addMethod("disableScript", function(text, element) {
return (text.match(/\<\bscript\b/i) || text.match(/\<\/\bscript\b/i))?false:true;
}, "Script tags are not allowed");
And how to use it?? It's very simple.
Just add this method to the list of rules to validate the particular input field.
Example:-
rules: {
first_name: {required: true, disableScript: true},
comment: {disableScript: true}
}
Note:
The JQuery validator plugin js file should be included in the page for this to work.
Subscribe to:
Posts (Atom)