How to safely escape transcluded templates stored as text/code values in semantic properties

From semantic-mediawiki.org

As noted in thread subject, I'd like to do the following: {{#set:Has text={{{Some_template_name_as_incoming_parameter|}}}}}, where 'Has text' is of the text and/ or code special type. However, this throws a 'Has improper value for' "error" for certain assignments (presumably resulting from invalid characters within the target template). Is there a best practice for escaping template content at time of value assignment to avoid such errors?

Thanks!

18:48, 20 November 2012