Moodle Bug: Unable to inject <script>javascript code</script> in blocks or course activities
- 
N nebulon marked this topic as a question on 
 - 
Those errors seem more like a moodle internal problem and possibly bugs worth reporting upstream unless those come from some of the custom code snippets.
 - 
I recorded a video to demonstrate the issue.
 - 
@joseph
I just tested the following 4 csp blockers but did not work.
The chatbot is still not showing up.
I am not sure if these plugins are actually good quality.
Some comments say it works, while other say it doesn't work.https://chromewebstore.google.com/detail/disable-content-security/ieelmcmcagommplceebfedjlakkhpden
https://chromewebstore.google.com/detail/anti-cors-anti-csp/fcbmpcbjjphnaohicmhefjihollidgkp
https://chromewebstore.google.com/detail/allow-csp-content-securit/hnojoemndpdjofcdaonbefcfecpjfflh
https://chromewebstore.google.com/detail/csp-unblock/lkbelpgpclajeekijigjffllhigbhobd - 
@taowang I tested from your video. From the browser's source it seems that the links are convereted into a tags. In Page -> More -> Filter, if you set "Convert URLs into links and images" to Off, something loads. I can send Hi to chatbot and it returns something.
 - 
OMG it worked!!!! Thank you very much.
Here is a site-wide config for all course pages:
- go to site administration > plugins
 - press command + 5 to search for "Convert URLs into links and images"
 - click on settings and toggle off the HTML format
 - use HTML format when injecting code with urls
 
 - 
J joseph has marked this topic as solved on
 - 
J joseph referenced this topic on
 - 
T taowang referenced this topic on
 
