0
0
mirror of https://github.com/ezyang/htmlpurifier.git synced 2024-12-22 08:21:52 +00:00

Allows commas in tel URI scheme validator (addresses #388)

This commit is contained in:
danbrellis 2023-11-09 23:43:30 -05:00 committed by GitHub
parent ab21ea735a
commit 8429f7b507
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -35,7 +35,7 @@ class HTMLPurifier_URIScheme_tel extends HTMLPurifier_URIScheme
// Delete all non-numeric characters, 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)));