/*
 * Fixed CCONF-538 on Sep 15 2009: prevent illegal characters in tag names
 * This script is included within the SHOWTHREAD template if tag management is accessible.
 */


jQuery('#tag_add_input').live('keypress', blockSpecialCharsInTagName);


/*
 * Called on each keypress of an input, prevents the following characters from being added to the input's value: / & + #
 */
function blockSpecialCharsInTagName(e) {
	if (
		e.which == 47 // slash
		|| e.which == 38 // ampersand
		|| e.which == 43 // plus
		|| e.which == 35 // pound
		) {
		e.preventDefault();
	}
}
