Title: Blogroll hack
Last modified: August 19, 2016

---

# Blogroll hack

 *  Resolved [apropos](https://wordpress.org/support/users/apropos/)
 * (@apropos)
 * [18 years, 1 month ago](https://wordpress.org/support/topic/blogroll-hack/)
 * I have setup a blog at work to use to replace our old intranet. In order to completely
   move from the old Intranet to the new blog, I have to add all of our internal
   links.
 * I keep running into this problem that WordPress will not allow you to add a file://
   instead of [http://](https://wordpress.org/support/topic/blogroll-hack/?output_format=md).
   If you do add the File:// you get the http appended to the front of the file://
 * Is there a way to keep WordPress from adding this?
 * Thanks,
 * Apropos

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Moderator [Samuel Wood (Otto)](https://wordpress.org/support/users/otto42/)
 * (@otto42)
 * WordPress.org Admin
 * [18 years, 1 month ago](https://wordpress.org/support/topic/blogroll-hack/#post-724832)
 * Edit wp-includes/formatting.php.
 * Find this line:
    `$protocols = array('http', 'https', 'ftp', 'ftps', 'mailto','
   news', 'irc', 'gopher', 'nntp', 'feed', 'telnet');`
 * Add ‘file’ to that array and then it will be allowed.
 *  Thread Starter [apropos](https://wordpress.org/support/users/apropos/)
 * (@apropos)
 * [18 years, 1 month ago](https://wordpress.org/support/topic/blogroll-hack/#post-724839)
 * Otto42,
 * Thank you so much, that fixed it!
 *  [keveeeen](https://wordpress.org/support/users/keveeeen/)
 * (@keveeeen)
 * [17 years, 3 months ago](https://wordpress.org/support/topic/blogroll-hack/#post-725472)
 * Hey guys,
 * this seems to work for me as well though WP is eliminating the space in my windows
   filenames…any idea where this is in the code so i can get rid of it?
 * many thanks!
 *  [keveeeen](https://wordpress.org/support/users/keveeeen/)
 * (@keveeeen)
 * [17 years, 3 months ago](https://wordpress.org/support/topic/blogroll-hack/#post-725473)
 * got it…
 * you have to comment out the below line in function clean_url in formatting.php
 * //$url = preg_replace(‘|[^a-z0-9-~+_.?#=!&;,/:%@$*\'()\\x80-\\xff]|i’, ”, $url);
 * if you actually know php (unlike me–i use to program about 10 years ago)…there’s
   probably a better way to do this but this works!

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Blogroll hack’ is closed to new replies.

## Tags

 * [file](https://wordpress.org/support/topic-tag/file/)

 * 4 replies
 * 3 participants
 * Last reply from: [keveeeen](https://wordpress.org/support/users/keveeeen/)
 * Last activity: [17 years, 3 months ago](https://wordpress.org/support/topic/blogroll-hack/#post-725473)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
