﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	severity	resolution	keywords	cc
11948	Shortcode parser doesn't support hyphen in shortcode name	ukdmbfan		"I tried creating a Shortcode with a hyphen (-) in the name, namely ""contact-us"", but the parser was not recognising the Shortcode. Removing the hyphen from the name made it work.

It may be that the parser is not supposed to support hyphens in Shortcode names, however the documentation suggests that it does by using examples with hyphens in them (""my-shortcode"", for example).

You should be able to easily reproduce this by creating a Shortcode with a hyphen in the name. Code I was using is below, removing the hyphen from the Shortcode name in the first parameter of the add_shortcode hook (and subsequently in the associated call in the blog post) returned the correct result. When the hyphen was present, the Shortcode tag was parsed and removed from the post, but was not replaced with the correct output and the associated function itself wasn't called at all.

Using WPMU 2.9.1.1.

{{{
function contact_us_func($atts, $content = null) {
    return '123';
}

/* NOT WORKING */

add_shortcode('contact-us', 'contact_us_func');
// [contact-us]

/* WORKING */

add_shortcode('contactus', 'contact_us_func');
// [contactus]
}}}
"	defect (bug)	closed	normal		Shortcodes	2.9.1	normal	invalid	reporter-feedback	
