code: function verifyHTML( caption ) {
  		if ( ! caption || ( caption.indexOf( '<' ) === -1 && caption.indexOf( '>' ) === -1 ) ) {
  			return caption;
  		}
  
  		if ( ! serializer ) {
  			serializer = new tinymce.html.Serializer( {}, editor.schema );
  		}
  
  		return serializer.serialize( editor.parser.parse( caption, { forced_root_block: false } ) );
  	}
docs: Verify HTML in captions