Steffen
Well-known member
- Affected version
- 2.0.11
When you try to post a "tel:" URL like
I'm in favor of stripping them because of two reasons: 1) They could be abused and don't seem to be used anyway (they are currently broken any no-one seems to have noticed). 2) Mobile Safari sometimes seems to create them automagically where they don't make any sense at all (see screenshot). Maybe this happens when copy-pasting (I'm not sure, I don't use iOS myself). But I see a couple of forum posts with useless (and broken) "tel:" URLs each week.
[URL='tel:123456']Call me![/URL]
then XenForo prepends the absolute forum URL to it. Needless to say, this breaks, the "tel:" URL. I think XenForo should either fix the handling of "tel:" URLs or strip them completely.I'm in favor of stripping them because of two reasons: 1) They could be abused and don't seem to be used anyway (they are currently broken any no-one seems to have noticed). 2) Mobile Safari sometimes seems to create them automagically where they don't make any sense at all (see screenshot). Maybe this happens when copy-pasting (I'm not sure, I don't use iOS myself). But I see a couple of forum posts with useless (and broken) "tel:" URLs each week.
Diff:
--- a/src/XF/Html/Renderer/BbCode.php
+++ b/src/XF/Html/Renderer/BbCode.php
@@ -589,7 +589,7 @@ class BbCode
return $text;
}
- if (preg_match('#^(data:|blob:|webkit-fake-url:|x-apple-data-detectors:)#i', $href))
+ if (preg_match('#^(data:|blob:|tel:|webkit-fake-url:|x-apple-data-detectors:)#i', $href))
{
return $text;
}