The text generated by op.render.viewOutline should be encoded. Right now if some text contains "double quotes" they appear literally not as ". When rendered by a browser this isn't a problem. But when we try to encode them as Javascript writes, it can break the resulting code.
op.render.viewOutline