Skip to content

Syntax error on special charachters like & #39

@jostmart

Description

@jostmart

I get syntax error when parsing repo files that contain & in "value".

bash-ini-parser: eval: line 86: syntax error near unexpected token `&'
bash-ini-parser: eval: line 86: `mirrorlist=( http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os&infra=$infra )'
bash-ini-parser: eval: line 89: syntax error near unexpected token `}'
bash-ini-parser: eval: line 89: `}'
[centos-kernel]
name=CentOS LTS Kernels for $basearch
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=kernel&infra=$infra

As a quick test, I escaped & and the example below passes.

[centos-kernel]
name=CentOS LTS Kernels for $basearch
mirrorlist=http://mirrorlist.centos.org/?release=$releasever\&arch=$basearch\&repo=kernel\&infra=$infra

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