Skip to content
This repository was archived by the owner on Dec 13, 2024. It is now read-only.
This repository was archived by the owner on Dec 13, 2024. It is now read-only.

Escape ^ and $ in export to CSV #1

@vlastikw

Description

@vlastikw

Hi,
I need to use field separator ^ or $ so I need to replace row
var endregex = new RegExp((FS=="|" ? "\|" : FS)+"+$");
with
var endregex = new RegExp((['|', '^', '$'].indexOf(FS) >= 0 ? '\' + FS : FS)+"+$");

in write_csv_stream and sheet_to_csv in file xlsx.js

Otherwise I get error Invalid regular expression: /^+$/: Nothing to repeat

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions