Skip to content

Newlines in attribute values are replaced with spaces #330

@aukeman

Description

@aukeman
  • Are you running the latest version?
  • Have you included sample input, output, error, and expected output?
  • Have you checked if you are using correct configuration?
  • Did you try online tool?

Description

newlines in attribute values are replaced with spaces when parsed

Code

parser.parse('<element attr="a\n\nmultiline\n\nstring"></element>', {ignoreAttributes: false});

Output

{ element: { '@_attr': 'a  multiline  string' } }

expected data

{ element: { '@_attr': 'a\n\nmultiline\n\nstring' } }

Would you like to work on this issue?

  • Yes
  • No

Bookmark this repository for further updates.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions