Skip to content

Two Attributes with quotes gives error #60

@edi9999

Description

@edi9999

This issue is very similar to #58 but not exactly the same :

Checklist

  • Are you running the latest version? : 3.2.3
  • Have you include sample input?
  • Have you include actual output?
  • Have you include expected output?
  • Have you checked if you are using correct configuration?
  • Did you try online tool?
  • Did you bookmarked the repository for further updates? ;)

Input data

When I run the following code :

require('fast-xml-parser').validate(`<?xml version="1.0" encoding="UTF-8" standalone="yes"?><foo name="First'attribute"/><foo name="First'attribute"/>`)

I get :

{ err:
   { code: 'InvalidAttr',
     msg: 'attribute /><foo has no space in starting.' } }

I would expect the result to be a validationsuccess (return true)

It is allowed to have the single quote character if using double quotes as the delimiters (see https://stackoverflow.com/a/866894/1993501)

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