If you set the anchor "click" callback to <script*src=*>*</script>
you will never have to deal with script-inline problems.
Your problem must be quoted, you can solve using () quotes if the (') apostrophes used to represent a value, or vice versa.
If you want to represent a quotation mark or apostrophe in a string in JavaScript you can escape it with \, for example: <a onclick='"\' apóstrofo - \" aspa"'></a>
. Or:
"\x22" // aspa (ASCII)
String.fromCharCode(0x22) // aspa
String.fromCharCode(34) // aspa
"\x27" // apóstrofo (ASCII)
"\u0022" // aspa (UTF-8)
"\u0027" // apóstrofo (UTF-8)
Basic example of using the <script/>
tag.
<script>
document.querySelector('a').onclick = function() {
exibirVideo('\
Embed code')
}
</script>