def _encode_v2(value):
    """
    Encode all ':' substrings in a string (also encodes '$' so that it can
    be used to mark encoded characters). This way we can use :: to separate
    the two halves of an aside key.
    """
    simple = value.replace('$', '$$').replace(':', '$:')
    return simple
