mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2024-12-22 08:21:52 +00:00
feat: Allows commas to be included in tel URI (#389)
* Allows commas in tel URI scheme validator (addresses #388)
* Adds comment explaining 8429f7b
This commit is contained in:
parent
ab21ea735a
commit
ec92490139
@ -33,9 +33,9 @@ class HTMLPurifier_URIScheme_tel extends HTMLPurifier_URIScheme
|
||||
$uri->host = null;
|
||||
$uri->port = null;
|
||||
|
||||
// Delete all non-numeric characters, non-x characters
|
||||
// Delete all non-numeric characters, commas, and non-x characters
|
||||
// from phone number, EXCEPT for a leading plus sign.
|
||||
$uri->path = preg_replace('/(?!^\+)[^\dx]/', '',
|
||||
$uri->path = preg_replace('/(?!^\+)[^\dx,]/', '',
|
||||
// Normalize e(x)tension to lower-case
|
||||
str_replace('X', 'x', rawurldecode($uri->path)));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user