Manual:$wgUrlProtocols/ko
Parser: $wgUrlProtocols | |
---|---|
미디어위키 파서에 의하여 지원되고 번역되는 HTML 안의 프로토콜을 정의한다. |
|
이 변수가 소개된 버전: | 1.5.0 (r10229) |
이 변수가 사라진 버전: | 계속해서 쓰이고 있음 |
허용값: | (array of strings) (1.6+) (string containing a regular expression) (1.5) |
기본값: | see below |
기타 설정: 알파벳 순 | 기능별 순 |
상세내역
미디어위키 파서에 의하여 지원되며 클릭이 가능한 링크로 변환되는 프로토콜들을 정의합니다.
This is used in lots of places.
The most visible effect is it determines what protocols are allowed for external links: unrecognized protocols are ignored, no link is generated.
However, it's used in many other places too, including the code for Special:LinkSearch, and utility functions like UrlUtils::parse()
that are used in a wide variety of different places.
몇몇 예제들은 작동하지 않습니다 ( 그 이유는 "test://" 가 유효한 프로토콜로 정의되지 않았기 때문입니다):
- test://www.example.com
- [test://www.example.com]
- [test://www.example.com link text]
- Some browsers, like Mozilla Firefox, will not follow file URLs on pages that have been loaded via HTTP. This is a security measure. See this mozillaZine article for more information, including some hints on how to overcome this restriction.
- Most browsers do not support "remote file" URLs like
file://host/share
(only Internet Explorer handles these per default. For Firefox, a plugin is required or use exactly 5 slashes likefile://///host/share
, see [1])
로컬 파일로 링크를 허용하기 위해서는 (인트라넷의 환경이라면 충분히 가능한 일입니다), 다음을 귀하의 LocalSettings.php 안에 추가하십시오:
$wgUrlProtocols[] = "file://";
Usually you only want to add protocols to this array.
Default values
미디어위키 버전: | ≥ 1.38 Gerrit change 876412 |
미디어위키 버전: | 1.35 Gerrit change 876392 |
$wgUrlProtocols = [
'bitcoin:', 'ftp://', 'ftps://', 'geo:', 'git://', 'gopher://', 'http://',
'https://', 'irc://', 'ircs://', 'magnet:', 'mailto:', 'matrix:', 'mms://',
'news:', 'nntp://', 'redis://', 'sftp://', 'sip:', 'sips:', 'sms:',
'ssh://', 'svn://', 'tel:', 'telnet://', 'urn:', 'worldwind://', 'xmpp:',
'//',
];
미디어위키 버전: | 1.24 – 1.37 |
$wgUrlProtocols = [
'bitcoin:', 'ftp://', 'ftps://', 'geo:', 'git://', 'gopher://', 'http://',
'https://', 'irc://', 'ircs://', 'magnet:', 'mailto:', 'mms://', 'news:',
'nntp://', 'redis://', 'sftp://', 'sip:', 'sips:', 'sms:', 'ssh://',
'svn://', 'tel:', 'telnet://', 'urn:', 'worldwind://', 'xmpp:','slack://', '//',
];
미디어위키 버전: | 1.22 – 1.23 |
$wgUrlProtocols = array(
'http://',
'https://',
'ftp://',
'ftps://', // If we allow ftp:// we should allow the secure version.
'ssh://',
'sftp://', // SFTP > FTP
'irc://',
'ircs://', // @bug 28503
'xmpp:', // Another open communication protocol
'sip:',
'sips:',
'gopher://',
'telnet://', // Well if we're going to support the above.. -ævar
'nntp://', // @bug 3808 RFC 1738
'worldwind://',
'mailto:',
'tel:', // If we can make emails linkable, why not phone numbers?
'sms:', // Likewise this is standardized too
'news:',
'svn://',
'git://',
'mms://',
'bitcoin:', // Even registerProtocolHandler whitelists this along with mailto:
'magnet:', // No reason to reject torrents over magnet: when they're allowed over http://
'urn:', // Allow URNs to be used in Microdata/RDFa <link ... href="urn:...">s
'geo:', // urls define geo locations, they're useful in Microdata/RDFa and for coordinates
'//', // for protocol-relative URLs
);
미디어위키 버전: | 1.18 – 1.21 |
$wgUrlProtocols = array(
'http://',
'https://',
'ftp://',
'irc://',
'ircs://', // @bug 28503
'gopher://',
'telnet://', // Well if we're going to support the above.. -ævar
'nntp://', // @bug 3808 RFC 1738
'worldwind://',
'mailto:',
'news:',
'svn://',
'git://',
'mms://',
'//', // for protocol-relative URLs
);
미디어위키 버전: | 1.17 |
$wgUrlProtocols = array(
'http://',
'https://',
'ftp://',
'irc://',
'gopher://',
'telnet://', // Well if we're going to support the above.. -ævar
'nntp://', // @bug 3808 RFC 1738
'worldwind://',
'mailto:',
'news:',
'svn://',
'git://',
'mms://',
);
미디어위키 버전: | 1.15 – 1.16 |
$wgUrlProtocols = array(
'http://',
'https://',
'ftp://',
'irc://',
'gopher://',
'telnet://', // Well if we're going to support the above.. -ævar
'nntp://', // @bug 3808 RFC 1738
'worldwind://',
'mailto:',
'news:',
'svn://',
);
미디어위키 버전: | 1.6 – 1.14 |
$wgUrlProtocols = array(
'http://',
'https://',
'ftp://',
'irc://',
'gopher://',
'telnet://', // Well if we're going to support the above.. -ævar
'nntp://', // @bug 3808 RFC 1738
'worldwind://',
'mailto:',
'news:'
);
미디어위키 버전: | 1.5 |
$wgUrlProtocols = 'http:\/\/|https:\/\/|ftp:\/\/|irc:\/\/|gopher:\/\/|news:|mailto:';
Advanced modification
The default protocols should all be safe to click on (no evil side effects), and removing a protocol from the list will cause URLs using those protocols to become unrecognized in many places throughout the software. In particular, removing 'http://' or other common protocols will probably break huge amounts of stuff. Nevertheless, if you need to do so (for example, you already have a News: namespace), you can do something like this:
$wgUrlProtocols = array_diff($wgUrlProtocols, array('news:'));
추가 참고
- URI schemes (historical)
- UNC links