The problem is that the pattern contains single quotes, so that they are open and closed alternatively, leaving part of the string to the shell which tries to interpret it with its own rules. Basically you can keep the quotes around the whole sed command and escape the inner ones. Moreover you have to use another separator in the sed command (other than slash) to avoid confusion with the literal slashes in the pattern. Something like this should work:
Code:
sed 's:if (IEexec || domExec) document.write('\''<iframe id="IdMyIframe" '\''+IframePropriedades+'\''></iframe>'\'');::g' file.php
In this example the opening quote is closed, then followed by an escaped quote (in red) and then re-opened. In alternative you can use double quotes to embed the sed command and escape the double quotes inside the pattern:
Code:
sed "s:if (IEexec || domExec) document.write('<iframe id=\"IdMyIframe\" '+IframePropriedades+'></iframe>');::g" file.php
Please test these solution without the -i option, until you're sure of the results.