The same here, fromSafeConstant must be used in case of constant-strings. In this case I think you should use the simpleSatinizer so as we check that 'code' dont have any 'dangerous' tag.

Anyway, I like the simplicity of $("<...>"), so maybe we should consider to use satinize or some safeHtml utilities in gquery.