This might be one of the reasons your code isn't working.
To avoid this, make sure to choose the Raw HTML option as your editor format. If that option isn't available, use a HTML editor to embed short code.