Quick fix for issue #556

Test it before merge - Allow script tag in activity causing the issue - from the comment its look like its is legacy code - please verify that also