diff --git a/core/includes/path.inc b/core/includes/path.inc
index dc878c0..a81603d 100644
--- a/core/includes/path.inc
+++ b/core/includes/path.inc
@@ -461,6 +461,29 @@ function path_save(&$path) {
     $path['original'] = path_load($path['pid']);
   }
 
+  // Some web services don't allow certain characters. Filter these out of all
+  // URLs to ensure it does not cause bigger problems later.
+  $invalid = array(
+    // The zero byte.
+    "\0",
+  );
+  // Invalid Windows characters.
+  if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
+    $invalid += array(
+      // Characters not allowed in filenames on Windows.
+      '\\', ':', '*', '?', '"', '<', '>', '|',
+    );
+  }
+  $regex = sprintf('/(%s)/', implode('|', array_map('preg_quote', $invalid)));
+  if (preg_match($regex, $path['alias'], $matches)) {
+    // This is not an error since it is the web server's decision to block it.
+    // Instead notify the user this path may not be accessible.
+    drupal_set_message(t(
+      "The given URL '@url' may not be accessible on all web servers due to having a '@illegal' as a character. You should check it's usability",
+      array('@url' => $path['alias'], '@illegal' => $matches[1])
+    ), 'warning');
+  }
+
   if (empty($path['pid'])) {
     drupal_write_record('url_alias', $path);
     module_invoke_all('path_insert', $path);
