Skip to content
This repository was archived by the owner on Jul 16, 2020. It is now read-only.

Commit 84fccb6

Browse files
committed
relax regex and use negative lookbehind to leave mailto: and tel: links, fix tests
1 parent 6cb9b20 commit 84fccb6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Generator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ private function adjustString($s)
8080
}
8181

8282
return preg_replace_callback(
83-
'/(<[^>]*>(*SKIP)(*FAIL)|:\w*)/',
83+
'/(?<!mailto|tel):\w*/',
8484
function ($matches) {
8585
return '{' . mb_substr($matches[0], 1) . '}';
8686
},

0 commit comments

Comments
 (0)