joomla/joomla-cms — pull request #3992 by nikosdion (2014-07-26 17:43:47+00:00)
Title: [#33473] itms-services schema not correctly handled

See Joomla! Tracker [#33473](itms-services schema not correctly handled)

# Description

The itms-services schema is used to distribute ad-hoc iOS apps outside iTunes. When you use it on a normal link inside an article the front-end output is not correct when SEF is enabled and the System - SEF plugin enabled. If you disable SEF URLs or the System - SEF plugin the schema is rendered correctly.

# Testing instructions

With SEF URLs and the System - SEF plugin enabled (both enabled by default) just create a link like that on simple article: itms-services://localhost?action=download-manifest&url=http://loqi.me/app/Geoloqi.plist

*Wrong behaviour*
On the front-end the link is renamed to: /path-to-joomla-site/itms-services://localhost?action=download-manifest&url=http://loqi.me/app/Geoloqi.plist

*Expected behaviour*
The link target remains itms-services://localhost?action=download-manifest&url=http://loqi.me/app/Geoloqi.plist

# Problem identification

The $protocols regex in the System - SEF plugin only catches schemas which contain just alphanumeric characters and numbers. Since the Apple schema itms-services:// contains a dash it is not caught by the RegEx and gets prefixed with the absolute URL path to the site's root.