Skip to content

Commit 61f3bd8

Browse files
authored
#6 support URI containing hyphen or underscore
1 parent 2380b32 commit 61f3bd8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

filter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ protected function convert_urls_into_codepens(&$text) {
115115
$unicoderegexp = @preg_match('/\pL/u', 'a'); // This will fail silently, returning false.
116116
}
117117

118-
$regex = '((https?://)?)(codepen.io\/)([a-zA-Z0-9]+)(\/pen\/)([a-zA-Z0-9]+)';
118+
$regex = '((https?://)?)(codepen.io\/)([a-zA-Z0-9_-]+)(\/pen\/)([a-zA-Z0-9_-]+)';
119119

120120
if ($unicoderegexp) {
121121
$regex = '#' . $regex . '#ui';

0 commit comments

Comments
 (0)