• Resolved beuntje

    (@beuntje)


    Script-tags included in the ticks are not executed (because of the use of “n.innerHTML = u.h”. Because of this, embeds (like Twitter, Instagram, … ) are not shown in ticks.

    This could be fixed by switching to underneath code. Could this be added to the plugin?

    var n = document.createElement( 'ul' );
    n.innerHTML = u.h;
    
    // insert: 
    var scripts = Array.prototype.slice.call(n.getElementsByTagName("script"));
    for (var i = 0; i < scripts.length; i++) {
    	if (scripts[i].src != "") {
    		var tag = document.createElement("script");
    		tag.src = scripts[i].src;
    		document.getElementsByTagName("head")[0].appendChild(tag);
    	}
    	else {
    		eval(scripts[i].innerHTML);
    	}
    }
    // end insert
    
    // Prepend new ticks to container.
    while ( n.hasChildNodes() ) {
    	t.e.prepend( n.lastChild );
    }
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Ticks with embedded script are not executed’ is closed to new replies.