aboutsummaryrefslogtreecommitdiff
path: root/mod
diff options
context:
space:
mode:
Diffstat (limited to 'mod')
-rw-r--r--mod/thewire/start.php2
-rw-r--r--mod/thewire/tests/regex.php6
2 files changed, 7 insertions, 1 deletions
diff --git a/mod/thewire/start.php b/mod/thewire/start.php
index 202e3d1d6..fdaf91355 100644
--- a/mod/thewire/start.php
+++ b/mod/thewire/start.php
@@ -219,7 +219,7 @@ function thewire_filter($text) {
// usernames
$text = preg_replace(
- '/(^|[^\w])@([\w.]+)/',
+ '/(^|[^\w])@([\p{L}\p{Nd}._]+)/u',
'$1<a href="' . $CONFIG->wwwroot . 'thewire/owner/$2">@$2</a>',
$text);
diff --git a/mod/thewire/tests/regex.php b/mod/thewire/tests/regex.php
index f5487a422..c73e06bdc 100644
--- a/mod/thewire/tests/regex.php
+++ b/mod/thewire/tests/regex.php
@@ -127,6 +127,12 @@ class TheWireRegexTest extends ElggCoreUnitTest {
$expected = "test (" . $this->getUserWireLink('user') . ") test";
$result = thewire_filter($text);
$this->assertEqual($result, $expected);
+
+ // utf8 characters
+ $text = "@tyúkanyó";
+ $expected = $this->getUserWireLink('tyúkanyó');
+ $result = thewire_filter($text);
+ $this->assertEqual($result, $expected);
}
/**