fix #688 and provide a unit test

This commit is contained in:
Hannu Hartikainen 2015-12-01 21:31:12 +02:00
commit b0f4ee4413
2 changed files with 9 additions and 1 deletions

View file

@ -120,7 +120,7 @@ weechat.filter('DOMfilter', ['$filter', '$sce', function($filter, $sce) {
if (node === undefined || node === null) return;
node = node.firstChild;
while (node) {
var nextNode;
var nextNode = null;
// do not recurse inside links if the filter would create a nested link
if (!(createsAnchor && node.tagName === 'A')) {
nextNode = process(node);