From cdeed4d28495e36562e58e5440385e230b32c190 Mon Sep 17 00:00:00 2001
From: Timothy Steiner <tsteiner2@unl.edu>
Date: Thu, 18 Feb 2010 23:54:28 +0000
Subject: [PATCH] Fixing a bug that will hang the editor if anchor tags without
 href attributes are used.

---
 editor_plugin.js | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/editor_plugin.js b/editor_plugin.js
index 409b73c..d0855df 100644
--- a/editor_plugin.js
+++ b/editor_plugin.js
@@ -47,6 +47,9 @@
 			    for (var i = 0; i < links.length; i++) {
 			        var link = links[i];
 			        var href = link.getAttribute('href');
+			        if (!href) {
+			            continue;
+			        }
 			        
 			        // add icons to links via UNL template
 			        if (href.search(/^mailto:/) >= 0 ) {
-- 
GitLab