Make WordPress Core

Opened 9 years ago

Closed 8 years ago

#18469 closed defect (bug) (invalid)

esc_url prevents embedding tel: links in custom menus

Reported by: jb510 Owned by: jb510
Milestone: Priority: normal
Severity: minor Version: 3.2.1
Component: General Keywords: has-patch
Focuses: Cc:


When adding a tel: URL to a custom menu via custom links the URL is removed by esc_url as it is not a whitelisted protocol. (line 2267 in wp-includes/formatting.php).

I also noticed git: wasn't included in the whitelist array so I added it for good measure.

Attachments (1)

formatting.php.patch (621 bytes) - added by jb510 9 years ago.
Adds tel and git to protocol whitelist array

Download all attachments as: .zip

Change History (5)

9 years ago

Adds tel and git to protocol whitelist array

#1 @ocean90
9 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

#2 @jkudish
9 years ago

  • Cc joachim.kudish@… added

Should we not add all of the valid protocols then? http://en.wikipedia.org/wiki/URI_scheme

#3 @uuf6429
8 years ago

  • Resolution duplicate deleted
  • Status changed from closed to reopened

Uh, we're missing a few important/interesting protocols, such as "skype:"...I think Joachim's link should be useful...

#4 @ocean90
8 years ago

  • Resolution set to invalid
  • Status changed from reopened to closed

uuf6429, can you open a new ticket please?

Also, #18268 was the main ticket which adds a filter where you can hook into to add additional protocols.

Note: See TracTickets for help on using tickets.