The current list of allowed protocols needs to be updated to allow iTunes subscription urls to be embedded without url encoding.
I would also think we need a better way to admin this list beyond hard coding within the filter module. I imagine that this list will always need updating as new protocols are developed. It used to be easier to keep up with new protocols, but I imagine that this may become more difficult over time.
Doesn't it make better sense nowadays if this list was administered instead of coded? My two cents.
thanks,
Katrina
www.ambereyes.net
Comments
Comment #1
sunComment #2
sunWorks and passes for me.
Comment #3
dries commentedI think we should drop this magic and add "://" to each entry in the
$protocolsarray. Why? RFC 1738 (Uniform Resource Locators) describes a URL as follows:<scheme>:<scheme-specific-part>. The "//" is used to indicate that the scheme-specific-part (not the scheme itself!) complies with a common scheme syntax (i.e. username@password:domain:port). Having '//' is not a hard requirement. For example, a news URL takes one of two forms:The nntp:// URL scheme is an alternative method of referencing news articles but news: is valid too. In other words, the current code makes assumptions that are not part of the specification. That is why I recommend removing the magic to automatically add "://".
PS: Skype uses 'callto://' which might be worth adding?
Comment #4
sunHm. Problem with that is that the filter_allowed_protocols variable is effectively *re-used* here. The variable already exists and is used like since always in filter_xss_bad_protocol().
And filter_xss_bad_protocol() would become very complex if the protocols would already contain those suffixes/separators.
I'd therefore recommend to just enhance the PCRE to always optionally match (?://) after $protocols...
d'oh. Looking more closely at the already matches characters after $protocols, '//' is already matched.
Powered by Dreditor.
Comment #5
sunWorks!
Whether skype: or any other protocol belongs into this default list is a separate issue. At first sight, my gut feeling was: If we add skype:, then what about xmpp: or jabber: or whatever else? Also, Skype is proprietary... and, heh, searching for "skype" in contrib quickly revealed: http://drupal.org/project/filter_protocols by Dave Reid ;) We may want to consider to move that functionality into core.
Comment #6
sunThis looks pretty RTBC to me, and I'd like to move on to other input filter processing bugs in the queue, from which most need to change the very same lines of code.
As mentioned before, I'd really like to see a separate issue to quickly move http://drupal.org/project/filter_protocols into core.
Wait.
Would it make sense to configure the list of protocols per text format?
Comment #7
sunNo, let's defer that to D8.
RTBC, anyone?
Comment #8
corey.aufang commentedComing in from #753278: URL Filter converts unsupported protocols and this looks good.
Comment #9
Garrett Albright commentedThe project description page for my Drupher module has a similar situation to what corey.aufang is describing in #753278: URL Filter converts unsupported protocols. I typed in a Gopher URL and the filter is unhelpfully chopping off the "gopher:" from the front when it automatically linkifies it. Not linkifying it at all would have been better behavior.
Comment #10
retester2010 commented#5: drupal.filter-url-protocols.5.patch queued for re-testing.
Comment #12
sunPostponing on #161217: URL filter breaks generated href tags
Comment #13
sunThis had to be incorporated into #161217: URL filter breaks generated href tags to make the new URL filter tests pass.