Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Allows commas to be included in tel URI #389

Merged
merged 2 commits into from
Nov 10, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions library/HTMLPurifier/URIScheme/tel.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ public function doValidate(&$uri, $config, $context)
$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)));

Expand Down
Loading