Skip to content

Method not found: get_SanitizeForInjection() #45

Description

@completej

Describe the bug
ExcelWriter fails to export.

To Reproduce
Steps to reproduce the behavior:

  1. Use CsvHelper 29+

Expected behavior
ExcelWriter should export to xlsx as expected

Versions (please complete the following information):

  • CSVHelper: 29.0.0
  • CSVHelper.Excel.Core: 27.2.1

From CsvHelper changelog @ https://joshclose.github.io/CsvHelper/change-log/ :

Changed CsvConfiguration.SanitizeInjection flag to CsvConfiguration.InjectionOptions enum.

Options are:
    None - Default. Does no injection protection. The is default because it's not a part of CSV and is used for an external tool.
    Escape - Escapes the field based on OWASP recommendations if an injection char is detected.
    Strip - Removes the injection character.
    Exception - Throws an exception if an injection char is detected.
Added \t and \r to CsvConfiguration.InjectionEscapeCharacter.
Changed CsvConfiguration.InjectionEscapeCharacter from \t to '.

and

Breaking Changes

CsvConfiguration.SanitizeForInjection -> CsvConfiguration.InjectionOptions
bool IWriterConfiguration.SanitizeForInjection -> InjectionOptions IWriterConfiguration.InjectionOptions

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions