Please excuse but I added some mark-up so the code you posted could be read properly without re-formatting by the forum software.
This is quite simple. You want to delimit a string in action code that needs to include double (straight) quotes. Action code allows use of both single and double straight quotes as long as properly paired and nested. By general convention double-quotes are used to delimit strings in action code but either form may be used, thus:
"It was a 'crazed' objection."
'He said "Hello", I think.'
in the first case it is double enclosing (one or more) single quotes. Vice-versa in the second.
I think your original code should be:
In the last part with the closing tag, notice I used double quotes as no quotes needed nesting. This should you can mix both types within an expression. If the contents of the string needed to use both single and double quotes, break the string into parts, so as doubles enclose singles and vice-versa. If both the previous examples were one string:
"It was a 'crazed' objection. He said "+' "Hello", '+"I think."
Does that help?