'Replaces dynamical tags in `query` with property values.
**Important**
Because this tags are dynamic resp. foreign (user) input:
- values should be escaped (using "escape" as shell variable)
- no recursive substitution (no interpolation for <a<b>>)
- don\'t use cache
Parameters
query : str
String with tags.
aInfo : dict
Tags(keys) and associated values for substitution in query.
Returns
str
shell script as string or array with tags replaced (direct or as variables).'

@classmethod
def replaceDynamicTags(cls, realCmd, aInfo):

    varsDict = dict()
    def escapeVal(tag, value):
        if cls.ESCAPE_CRE.search(value):
            tag = ('f2bV_%s' % cls.ESCAPE_VN_CRE.sub('_', tag))
            varsDict[tag] = value
            value = ('$' + tag)
        return value
    def substVal(m):
        tag = m.group(1)
        try:
            value = aInfo[tag]
        except KeyError:
            return ADD_REPL_TAGS.get(tag, m.group())
        value = str(value)
        return escapeVal(tag, value)
    realCmd = TAG_CRE.sub(substVal, realCmd)
    if ('<' in realCmd):
        tickData = aInfo.get('F-*')
        if (not tickData):
            tickData = {}
        def substTag(m):
            tag = mapTag2Opt(m.groups()[0])
            try:
                value = str(tickData[tag])
            except KeyError:
                return ''
            return escapeVal(('F_' + tag), value)
        realCmd = FCUSTAG_CRE.sub(substTag, realCmd)
    if varsDict:
        realCmd = Utils.buildShellCmd(realCmd, varsDict)
    return realCmd
