1
0
mirror of https://github.com/ezyang/htmlpurifier.git synced 2025-07-30 19:00:10 +02:00

Ignore commas and nbsps for linkification. Thanks nAS for contributing.

Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
This commit is contained in:
Edward Z. Yang
2013-05-21 13:35:34 -07:00
parent 3c903b7463
commit 19360ddb36
2 changed files with 4 additions and 1 deletions

View File

@@ -21,7 +21,8 @@ class HTMLPurifier_Injector_Linkify extends HTMLPurifier_Injector
// there is/are URL(s). Let's split the string:
// Note: this regex is extremely permissive
$bits = preg_split('#((?:https?|ftp)://[^\s\'"<>()]+)#S', $token->data, -1, PREG_SPLIT_DELIM_CAPTURE);
$bits = preg_split('#((?:https?|ftp)://[^\s\'",<>()]+)#Su', $token->data, -1, PREG_SPLIT_DELIM_CAPTURE);
$token = array();