1
0
mirror of https://github.com/ezyang/htmlpurifier.git synced 2025-08-03 12:47:56 +02:00

Add support for encoded tel URI schemes. (#354)

This commit is contained in:
Michael S
2022-11-24 21:31:20 +00:00
committed by GitHub
parent becc9d40cf
commit 1424f17cf3
5 changed files with 16 additions and 1 deletions

View File

@@ -37,7 +37,7 @@ class HTMLPurifier_URIScheme_tel extends HTMLPurifier_URIScheme
// from phone number, EXCEPT for a leading plus sign.
$uri->path = preg_replace('/(?!^\+)[^\dx]/', '',
// Normalize e(x)tension to lower-case
str_replace('X', 'x', $uri->path));
str_replace('X', 'x', rawurldecode($uri->path)));
return true;
}