use base64 encoding for embedded scripts

can avoid some issues in browsers' renderers (habrahabr pages was broken
because of nested </script> in script content.
Merge branch 'b64script' into devel