• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

PukiWiki


Commit MetaInfo

Revision8b227c3c5859320685cd103568cf7dafac86bb57 (tree)
Time2016-02-05 23:00:54
Authorumorigu <umorigu@gmai...>
Commiterumorigu

Log Message

BugTrack2/7 Handle URL with double brackets as a simple URL

Change Summary

Incremental Difference

--- a/lib/make_link.php
+++ b/lib/make_link.php
@@ -1,8 +1,8 @@
11 <?php
22 // PukiWiki - Yet another WikiWikiWeb clone.
3-// $Id: make_link.php,v 1.38 2011/01/25 15:01:01 henoheno Exp $
4-// Copyright (C)
5-// 2003-2007 PukiWiki Developers Team
3+// make_link.php
4+// Copyright
5+// 2003-2016 PukiWiki Development Team
66 // 2001-2002 Originally written by yu-ji
77 // License: GPL v2 or (at your option) any later version
88 //
@@ -355,11 +355,12 @@ class Link_url extends Link
355355 {
356356 $s1 = $this->start + 1;
357357 return <<<EOD
358-(\[\[ # (1) open bracket
359- ((?:(?!\]\]).)+) # (2) alias
358+((?:\[\[))? # (1) open bracket
359+((?($s1) # (2) alias
360+((?:(?!\]\]).)+) # (3) alias name
360361 (?:>|:)
361-)?
362-( # (3) url
362+))?
363+( # (4) url
363364 (?:(?:https?|ftp|news):\/\/|mailto:)[\w\/\@\$()!?&%#:;.,~'=*+-]+
364365 )
365366 (?($s1)\]\]) # close bracket
@@ -368,12 +369,12 @@ EOD;
368369
369370 function get_count()
370371 {
371- return 3;
372+ return 4;
372373 }
373374
374375 function set($arr, $page)
375376 {
376- list(, , $alias, $name) = $this->splice($arr);
377+ list(, , , $alias, $name) = $this->splice($arr);
377378 return parent::setParam($page, htmlsc($name),
378379 '', 'url', $alias == '' ? $name : $alias);
379380 }
@@ -851,4 +852,3 @@ function get_interwiki_url($name, $param)
851852
852853 return $url;
853854 }
854-