OSDN Git Service
(root)
/
pukiwiki
/
pukiwiki.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
BugTrack/2512 preg_replace with PCRE_UTF8 (/u) option (AutoLink)
[pukiwiki/pukiwiki.git]
/
lib
/
make_link.php
diff --git
a/lib/make_link.php
b/lib/make_link.php
index
36063c6
..
73ade5f
100644
(file)
--- a/
lib/make_link.php
+++ b/
lib/make_link.php
@@
-117,7
+117,7
@@
class InlineConverter
$this->page = $page;
$this->result = array();
$this->page = $page;
$this->result = array();
- $string = preg_replace_callback('/' . $this->pattern . '/x',
+ $string = preg_replace_callback('/' . $this->pattern . '/x'
. get_preg_u()
,
array(& $this, 'replace'), $string);
$arr = explode("\x08", make_line_rules(htmlsc($string)));
array(& $this, 'replace'), $string);
$arr = explode("\x08", make_line_rules(htmlsc($string)));
@@
-141,7
+141,8
@@
class InlineConverter
function get_objects($string, $page)
{
$matches = $arr = array();
function get_objects($string, $page)
{
$matches = $arr = array();
- preg_match_all('/' . $this->pattern . '/x', $string, $matches, PREG_SET_ORDER);
+ preg_match_all('/' . $this->pattern . '/x' . get_preg_u(),
+ $string, $matches, PREG_SET_ORDER);
foreach ($matches as $match) {
$obj = $this->get_converter($match);
if ($obj->set($match, $page) !== FALSE) {
foreach ($matches as $match) {
$obj = $this->get_converter($match);
if ($obj->set($match, $page) !== FALSE) {
@@
-281,7
+282,7
@@
EOD;
// Re-get true plugin name and patameters (for PHP 4.1.2)
$matches = array();
// Re-get true plugin name and patameters (for PHP 4.1.2)
$matches = array();
- if (preg_match('/^' . $this->pattern . '/x', $all, $matches)
+ if (preg_match('/^' . $this->pattern . '/x'
. get_preg_u()
, $all, $matches)
&& $matches[1] != $this->plain)
list(, $this->plain, $name, $this->param) = $matches;
&& $matches[1] != $this->plain)
list(, $this->plain, $name, $this->param) = $matches;