mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2025-01-08 15:11:51 +00: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:
parent
3c903b7463
commit
19360ddb36
2
NEWS
2
NEWS
@ -13,6 +13,8 @@ NEWS ( CHANGELOG and HISTORY ) HTMLPurifier
|
|||||||
# URI parsing algorithm was made more strict, so only prefixes which
|
# URI parsing algorithm was made more strict, so only prefixes which
|
||||||
looks like schemes will actually be schemes. Thanks
|
looks like schemes will actually be schemes. Thanks
|
||||||
Michael Gusev <mgusev@sugarcrm.com> for fixing.
|
Michael Gusev <mgusev@sugarcrm.com> for fixing.
|
||||||
|
- Made Linkify URL parser a bit less permissive, so that non-breaking
|
||||||
|
spaces and commas are not included as part of URL. Thanks nAS for fixing.
|
||||||
|
|
||||||
4.5.0, released 2013-02-17
|
4.5.0, released 2013-02-17
|
||||||
# Fix bug where stacked attribute transforms clobber each other;
|
# Fix bug where stacked attribute transforms clobber each other;
|
||||||
|
@ -21,7 +21,8 @@ class HTMLPurifier_Injector_Linkify extends HTMLPurifier_Injector
|
|||||||
|
|
||||||
// there is/are URL(s). Let's split the string:
|
// there is/are URL(s). Let's split the string:
|
||||||
// Note: this regex is extremely permissive
|
// 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();
|
$token = array();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user