Make WordPress Core

Opened 7 years ago

Closed 5 years ago

Last modified 5 years ago

#39415 closed enhancement (fixed)

Adding sms to list of allowed protocol

Reported by: rilwis's profile rilwis Owned by: whyisjake's profile whyisjake
Milestone: 5.3 Priority: normal
Severity: normal Version: 4.8
Component: Formatting Keywords: has-patch has-dev-note
Focuses: Cc:


Currently, the list of allowed protocols is provided in the function wp_allowed_protocols() . However, the list doesn’t have the "sms" protocol.

This is a new protocol and very useful for mobile users as they can send SMS when clicking the link. It’s very similar to "tel" protocol where users can call a person when clicking the link.


Attachments (3)

39415.patch (1.7 KB) - added by keraweb 5 years ago.
Added 'skype' and 'sms' to the protocols array.
39415.2.patch (1.7 KB) - added by kraftbj 5 years ago.
Only add SMS and remove extra character added to line 1 in the original patch. Updates @since.
39415.3.diff (2.3 KB) - added by whyisjake 5 years ago.
Added a test case for SMS.

Download all attachments as: .zip

Change History (15)

#1 @agusmu
7 years ago

personally, I like this idea.

the problems are:
(1) sms protocol is very buggy
(2) it has different format for different devices (android, iphone, old iphone iOS7/8, etc)
(3) it doesn't work on facebook in-app browser

#2 @rilwis
7 years ago

Thanks agusmu for your comment.

I think the format of the protocol is not a problem. All of them use the same "sms:" protocol, the only difference is the following text. I just mean we add the protocol, not for supporting the links.

If we add the protocol, the devices which support that (iPhone, Android) will be able to open the SMS/Phone app and do its job. Think about "skype:" protocol, it works only if your computer installed Skype.

This ticket is about supporting the protocol, not making it work. Making it work is the totally different story and in my opinion, is out of the scope of WordPress itself.

5 years ago

Added 'skype' and 'sms' to the protocols array.

#3 @keraweb
5 years ago

  • Keywords has-patch dev-feedback added

I agree with @rilwis. Whether the end user can use it is not up to WordPress. WordPress should IMO allow site owners to choose themselves if they want to use these protocols or not. I've also added skype since that wasn't in there as well.

#4 @SergeyBiryukov
5 years ago

#46579 was marked as a duplicate.

#5 @SergeyBiryukov
5 years ago

  • Component changed from General to Formatting
  • Milestone changed from Awaiting Review to 5.3

#6 @kraftbj
5 years ago

While I can support the SMS protocol being added, skype causes me pause—why not add tg for Telegram? It can get to be a long list of particular program-specific protocols.

I would suggest only adding SMS.

Additional ref: which defines the sms:// protocol.

5 years ago

Only add SMS and remove extra character added to line 1 in the original patch. Updates @since.

This ticket was mentioned in Slack in #core by david.baumwald. View the logs.

5 years ago

#8 @whyisjake
5 years ago

  • Owner set to whyisjake
  • Status changed from new to assigned

#9 @whyisjake
5 years ago

  • Keywords commit added; dev-feedback removed

#10 @whyisjake
5 years ago

  • Keywords needs-testing added

5 years ago

Added a test case for SMS.

#11 @whyisjake
5 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

In 46172:

Add SMS to the list of allowed protocols.

This commit expands the list of allowed protocols. It adds the sms:// which can be used to open meessaging clients for mobile users.

Props rilwis, kraftbj

Fixes #39415

#12 @desrosj
5 years ago

  • Keywords has-dev-note added; commit needs-testing removed

Mentioned in the Miscellaneous Developer Focused Changes dev note for 5.3:

Note: See TracTickets for help on using tickets.