From b4609f525216ac478aa27e4f54858dde810b9499 Mon Sep 17 00:00:00 2001
From: Max Petyurenko <max@drucode.com>
Date: Mon, 26 May 2014 23:18:43 +0300
Subject: [PATCH] Issue #2274475, by kleinmp: Slashes in words break the regex
 pattern.

---
 word_link.module | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/word_link.module b/word_link.module
index 9dca82e..559455e 100644
--- a/word_link.module
+++ b/word_link.module
@@ -280,7 +280,7 @@ function word_link_convert_text($words, $text, $settings) {
 
     if ($url != $path && !$match && !$visibility || $url != $path && $visibility && $match) {
       $text_lower = preg_replace('/\s+/', ' ', trim($word->text_lower));
-      $pattern[] = preg_replace('/ /', '\\s+', preg_quote($text_lower));
+      $pattern[] = preg_replace('/ /', '\\s+', preg_quote($text_lower, '/'));
     }
   }
   if ($settings['word_link_boundary']) {
-- 
1.8.4.msysgit.0

