From 606958c289e64ed3d24e553b8d1d1433422a4f3d Mon Sep 17 00:00:00 2001 From: David Shorthouse Date: Thu, 6 Sep 2012 15:26:18 -0300 Subject: [PATCH] Update jquery.highlight.js Accommodate html entity for spaces in node data when words may be phrases. --- jquery.highlight.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jquery.highlight.js b/jquery.highlight.js index 9dcf3c7..398075a 100644 --- a/jquery.highlight.js +++ b/jquery.highlight.js @@ -46,7 +46,7 @@ jQuery.extend({ highlight: function (node, re, nodeName, className) { if (node.nodeType === 3) { - var match = node.data.match(re); + var match = node.data.replace(/\u00a0/g, " ").match(re); if (match) { var highlight = document.createElement(nodeName || 'span'); highlight.className = className || 'highlight';