Before you ask, I already searched a lot in Stack Overflow and I google it thousand times. Any other case I ever seen here helped me.
Let's go to my problem:
I'm trying to use the following script in my code:
<script type='text/javaScript'>
document.write("<script src='/feeds/posts/default/-/"+hom_cat1+"?max-results=1&orderby=published&alt=json-in-script&callback=showhomeposts1'></script>");
</script>
But I'm using Blogger and it don't detect correctly my code (note the red script closing tag):

With this, I can't save the Template. So I'm trying to use convert my code into HTML entities using this website. When I encode, put this into my template and save, I get:
Uncaught SyntaxError: Unexpected token ILLEGAL
Here's the encoded string I'm trying to use:
<script type='text/javaScript'>document.write("<script src='/feeds/posts/default/-/"+hom_cat1+"?max-results=1&orderby=published&alt=json-in-script&callback=showhomeposts1'></script>");</script>