def add_plaintext_fields(record):
    """
    For each field in the record, add a `plain_` field containing the
    plaintext, stripped from braces and similar. See
    https://github.com/sciunto-org/python-bibtexparser/issues/116.

    :param record: the record.
    :type record: dict
    :returns: dict -- the modified record.
    """
    def _strip_string(string):
        for stripped in ['{', '}']:
            string = string.replace(stripped, "")
        return string

    for key in list(record.keys()):
        plain_key = "plain_{}".format(key)
        record[plain_key] = record[key]

        if isinstance(record[plain_key], str):
            record[plain_key] = _strip_string(record[plain_key])
        elif isinstance(record[plain_key], dict):
            record[plain_key] = {
                subkey: _strip_string(value)
                for subkey, value in record[plain_key].items()
            }
        elif isinstance(record[plain_key], list):
            record[plain_key] = [
                _strip_string(value)
                for value in record[plain_key]
            ]

    return record