Help:错误标题

From MediaWiki.org
Jump to navigation Jump to search
This page is a translated version of the page Help:Bad title and the translation is 100% complete.
Other languages:
English • ‎Türkçe • ‎français • ‎فارسی • ‎中文 • ‎日本語

由于许多不同的原因,您无法使用以下这些例子作为页面标题。

关于如何规定错误标题,请参阅正则表达式段落或者Title.php .

这种标题虽然可用,但强烈不建议使用它们:

  • 包含 ¬`!"£$^&*()_+-=~?/.,;:'@

这些字符无法被用作标题:

HTTP代码

返回的错误代码由MediaWiki软件版本决定:

  • v1.19.1及以后:400 (Bad Request)
  • v1.16.4及以前:200 (OK)

正则表达式

# Matching titles will be held as illegal.
$rxTc = '/' .
	# Any character not allowed is forbidden...
	'[^' . self::legalChars() . ']' .
	# URL percent encoding sequences interfere with the ability
	# to round-trip titles -- you can't link to them consistently.
	'|%[0-9A-Fa-f]{2}' .
	# XML/HTML character references produce similar issues.
	'|&[A-Za-z0-9\x80-\xff]+;' .
	'|&#[0-9]+;' .
	'|&#x[0-9A-Fa-f]+;' .
	'/S';

另请参阅