You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When saving a redactor field with a phone number that contains commas (,) it is parsed to remove those commas. This is problematic for conference call-in numbers that use the commas to 'pause' before dialing the dial-in passcode. This is ultimately a result of HTML Purifier and I have opened an issue with them: ezyang/htmlpurifier#388
However, just like Craft will sanitize svgs before running the purifier and then putting them back, I wonder if this is something Craft should handle?
Alternatively, I would think a BEFORE_PURIFY and AFTER_PURIFY event pair would be practical here so I could santize those links myself. Other ideas or guidance is apperciated.
Steps to reproduce
Create a redactor field with 'purify html' enabled.
Create a hyperlink with the href of tel:+12029910477,,32288696#
Save and see how the href is now tel:+1202991047732288696# (no commas)
Additional info
Craft version: Pro 4.5.6.1
PHP version: 8.1
Plugins & versions: craftcms/redactor (v3.0.4)
The text was updated successfully, but these errors were encountered:
Description
When saving a redactor field with a phone number that contains commas (
,
) it is parsed to remove those commas. This is problematic for conference call-in numbers that use the commas to 'pause' before dialing the dial-in passcode. This is ultimately a result of HTML Purifier and I have opened an issue with them: ezyang/htmlpurifier#388However, just like Craft will sanitize svgs before running the purifier and then putting them back, I wonder if this is something Craft should handle?
See https://github.com/craftcms/html-field/blob/main/src/HtmlField.php#L198-L213
Alternatively, I would think a BEFORE_PURIFY and AFTER_PURIFY event pair would be practical here so I could santize those links myself. Other ideas or guidance is apperciated.
Steps to reproduce
tel:+12029910477,,32288696#
tel:+1202991047732288696#
(no commas)Additional info
The text was updated successfully, but these errors were encountered: