Lines Matching refs:url
105 $url = substr($match, 1, -1);
106 $handler->addCall('externallink', [$url, $url], $pos);
117 $url = $match;
121 $trailing = $this->peelGfmTail($url);
124 $title = $this->addProtocolPrefix($url);
126 $handler->addCall('externallink', [$url, $title], $pos);
144 * @param string $url Mutated in place to the trimmed URL
147 protected function peelGfmTail(string &$url): string argument
151 if (preg_match('/' . HtmlEntity::PATTERN . '$/', $url, $m)) {
153 $url = substr($url, 0, -strlen($m[0]));
154 … } elseif (str_ends_with($url, ')') && substr_count($url, ')') > substr_count($url, '(')) {
156 $url = substr($url, 0, -1);
170 * @param string $url Mutated in place to include the protocol prefix when one was added
173 protected function addProtocolPrefix(string &$url): ?string argument
176 if (str_starts_with($url, 'ftp') && !str_starts_with($url, 'ftp://')) {
180 if (str_starts_with($url, 'www')) {
181 $title = $url;
182 $url = 'http://' . $url;