Fix regression -- don't forbid all names which contain integers, but rather those which are them.

Note that that's still a bad check probably; the ID issue is that a digit isn't a valid first char.
This commit is contained in:
Brion Vibber 2007-12-27 22:18:40 +00:00
parent 35147ec2bb
commit 57a761acb5

View file

@ -159,7 +159,7 @@ function wfCite() {
return $this->error( 'cite_error_ref_no_key' );
}
if( preg_match( '/[0-9]+/', $key ) ) {
if( preg_match( '/^[0-9]+$/', $key ) ) {
# Numeric names mess up the resulting id's, potentially produ-
# cing duplicate id's in the XHTML. The Right Thing To Do
# would be to mangle them, but it's not really high-priority