          """
          A message containing SafeData is keeping its safe status when
          retrieved from the message storage.
          """
          def encode_decode(data):
              message = Message(constants.DEBUG, data)
              encoded = storage._encode(message)
              decoded = storage._decode(encoded)
              return decoded.message
  
          storage = self.get_storage()
          self.assertIsInstance(encode_decode(mark_safe("<b>Hello Django!</b>")), SafeData)
          self.assertNotIsInstance(encode_decode("<b>Hello Django!</b>"), SafeData)
 
</s> remove             if obj.extra_tags:
 </s> add             if obj.extra_tags is not None:
        self.assertIsInstance(
            self.encode_decode(mark_safe('<b>Hello Django!</b>')).message,
            SafeData,
        )
        self.assertNotIsInstance(
            self.encode_decode('<b>Hello Django!</b>').message,
            SafeData,
        )
          """
          A message containing SafeData is keeping its safe status when
          retrieved from the message storage.
          """
        self.assertIsInstance(
            self.encode_decode(mark_safe('<b>Hello Django!</b>')).message,
            SafeData,
        )
        self.assertNotIsInstance(
            self.encode_decode('<b>Hello Django!</b>').message,
            SafeData,
        )
        self.assertIsInstance(
            self.encode_decode(mark_safe('<b>Hello Django!</b>')).message,
            SafeData,
        )
        self.assertNotIsInstance(
            self.encode_decode('<b>Hello Django!</b>').message,
            SafeData,
        )
        self.assertIsInstance(
            self.encode_decode(mark_safe('<b>Hello Django!</b>')).message,
            SafeData,
        )
        self.assertNotIsInstance(
            self.encode_decode('<b>Hello Django!</b>').message,
            SafeData,
        )
        self.assertIsInstance(
            self.encode_decode(mark_safe('<b>Hello Django!</b>')).message,
            SafeData,
        )
        self.assertNotIsInstance(
            self.encode_decode('<b>Hello Django!</b>').message,
            SafeData,
        )
        self.assertIsInstance(
            self.encode_decode(mark_safe('<b>Hello Django!</b>')).message,
            SafeData,
        )
        self.assertNotIsInstance(
            self.encode_decode('<b>Hello Django!</b>').message,
            SafeData,
        )
  
          storage = self.get_storage()
          self.assertIsInstance(encode_decode(mark_safe("<b>Hello Django!</b>")), SafeData)
          self.assertNotIsInstance(encode_decode("<b>Hello Django!</b>"), SafeData)
keep keep keep keep replace replace replace replace replace keep keep keep keep
 Fixed #33458 -- Fixed encoding of messages with empty string as extra_tags. 
tests/messages_tests/test_cookie.py