alfredfrancis / ai-chatbot-framework

A python chatbot framework with Natural Language Understanding and Artificial Intelligence.
MIT License
1.96k stars 713 forks source link

Bug fix when integrate with widget #92

Closed marcoswca closed 6 years ago

marcoswca commented 6 years ago

When i copy and paste this script

<script type="text/javascript"> !function(win,doc){"use strict";var script_loader=()=>{try {var head=doc.head||doc.getElementsByTagName("head")[0],script=doc.createElement("script");script.setAttribute("type","text/javascript"),script.setAttribute("src",win.iky_base_url+"assets/widget/iky_widget.js"),head.appendChild(script)} catch(e){}};win.chat_context={"username":"John"},win.iky_base_url="http://localhost:8080/",script_loader()}(window,document); </script>

the application crashes because of document.body.innerHTML + = content;