Help:错误标题
出于各种原因,某些页面标题被定义为不良。 You can't create pages with these titles.
关于如何规定错误标题,请参阅正则表达式段落或者Title.php
.
这种标题虽然可用,但强烈不建议使用它们:
- Some¬`!"£$^&*()_+-=~?/.,;:'@
这些字符无法被用作标题:
- 使用被用作CGI标准字符的符号是非常不好的:
- wiki语言所用到的符号:
- 和本来就无法使用的标识符:
- 以及包含HTML标签会用到的的符号,不仅非常糟糕而且容易破坏页面样式:
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';