Forums | Mahara Community
Support
/
adding scripts to pages
03 April 2012, 5:01
HI I need to add some Javascript to a page (dashboard) on my Mahara installation, I have tried using the text Box but it cleans the Javascript out is there a work around for this ??
Thanks
Dave
03 April 2012, 14:32
Hello Dave,
Any potentially mallicious code, often hidden within JavaScript or iFrames is deleted upon saving a text box as HTML Purifier goes over it.
You can circumvent that behavior by writing a filter for the code that you deem safe. We have done so for YouTube, WikiEducator and others for example.
Cheers
Kristina
03 April 2012, 23:12
i would not know where to start Kristina I'm not a coder i was hoping there was a special block that worked around this issue
04 April 2012, 0:37
Hello Dave,
For security reasons, there is not an easy way around it.
In Mahara 1.5 it will be possible to allow self-defined iFrames to be used but that would not extend to javascript.
Cheers
Kristina