Jūs esate

Drupal. check_url() & MMS protocol

I was coding a small dialog for my bachelor theses. There is a text box where you can enter an URL address. So, before submitting the form I validate that text box with check_url() function. The problem is, that my address starts with MMS. It's something like that: mms://www.server.lt/directory/file. So, after check_url() function the result is: //www.server.lt/directory/file. I was googling for the solution and I've finally found it. The problem is in file modules/filter/filter.module file, line 1182. "MMS" is not in the list of allowed protocols. So, there are two posable  solutions:
  1. Edit that line and add "mms". Well, this is not recommended, because by doing that you're hacking the Drupal core. So, forget this.
  2. The other solution is to download the module "Filter protocols" (http://drupal.org/project/filter_protocols) and add "mms" (or any other) protocol. This can be done by selecting Site configuration->By module->Input formats. The tab "Allowed protocols".
Good luck!

Komentuoti