Help:错误标题

From mediawiki.org
This page is a translated version of the page Help:Bad title and the translation is 82% complete.
PD 注意:當您編輯本頁面時,即同意以CC0協議授權您的貢獻。您可以在公有領域帮助页面找到更多信息。 PD

出于各种原因,某些页面标题被定义为不良。 You can't create pages with these titles.

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

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

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

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

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';

參見