Title: Ticks with embedded script are not executed
Last modified: October 8, 2020

---

# Ticks with embedded script are not executed

 *  Resolved [beuntje](https://wordpress.org/support/users/beuntje/)
 * (@beuntje)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/ticks-with-embedded-script-are-not-executed/)
 * 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)

 *  Plugin Author [Stefan Kalscheuer](https://wordpress.org/support/users/stklcode/)
 * (@stklcode)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/ticks-with-embedded-script-are-not-executed/#post-13532014)
 * Thanks for your input and the possible solution!
 * Sounds like a reasonable change, so I’ll try to integrate with an upcoming release(
   [https://github.com/stklcode/wp-liveticker/issues/14](https://github.com/stklcode/wp-liveticker/issues/14)).
 * Cheers,
    Stefan

Viewing 1 replies (of 1 total)

The topic ‘Ticks with embedded script are not executed’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/stklcode-liveticker.svg)
 * [Liveticker (by stklcode)](https://wordpress.org/plugins/stklcode-liveticker/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/stklcode-liveticker/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/stklcode-liveticker/)
 * [Active Topics](https://wordpress.org/support/plugin/stklcode-liveticker/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/stklcode-liveticker/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/stklcode-liveticker/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Stefan Kalscheuer](https://wordpress.org/support/users/stklcode/)
 * Last activity: [5 years, 7 months ago](https://wordpress.org/support/topic/ticks-with-embedded-script-are-not-executed/#post-13532014)
 * Status: resolved