10000 Yaml parser · Issue #15674 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content
Yaml parser  #15674
Closed
Closed
@igormukhingmailcom

Description

@igormukhingmailcom

Hi.

Have next situation...
I've got yaml file from my colleague and this file parsed not successfully:

# fixture.yml
table.inventory:
    inventory1:
        name: First Inventory
        description: Information about first inventory
        filename: first_inventory.txt

Parsed data:

# bash output from var_dump
array(2) {
  'table.inventory' =>
  NULL # <----------------------------- THIS IS NOT RIGHT
  '  inventory1' =>
  array(3) {
    'name' =>
    string(15) "First Inventory"
    'description' =>
    string(33) "Information about first inventory"
    'filename' =>
    string(19) "first_inventory.txt"
  }
}

So I have a look to this file and found that some looks-like-space characters is not spaces.
When I've converted this looks-like-space character into html code I've got &ensp;.

(When I replaced it with spaces characters - all become work fine).

How can we prevent that situations... When parser see tab character - it throws error. Maybe we can also throw exceptions with another looks-like-space characters?

Thank you.

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

      0