diff --git a/src/taBind.js b/src/taBind.js index e3cd8807..75dc01ef 100644 --- a/src/taBind.js +++ b/src/taBind.js @@ -609,8 +609,9 @@ angular.module('textAngular.taBind', ['textAngular.factories', 'textAngular.DOM' // in case of pasting only a span - chrome paste, remove them. THis is just some wierd formatting // if we remove the ' ' here we destroy the spacing // on paste from even ourselves! - //text = text.replace(/(.<\/span>)/ig, ' '); - //text = text.replace(/<(|\/)span[^>]*?>/ig, ''); + if (!text.match(/.<\/span>/ig)) { + text = text.replace(/<(|\/)span[^>]*?>/ig, ''); + } } // Webkit on Apple tags text = text.replace(/
]*?>/ig, '').replace(/( | )<\/span>/ig, ' ');