mbj4668 / pyang

An extensible YANG validator and converter in python
ISC License
530 stars 342 forks source link

YANG 1.1 modules allow unquoted strings with a quote character inside it #826

Open binarycow opened 1 year ago

binarycow commented 1 year ago

RFC 7950 states:

An unquoted string cannot contain any single or double quote characters. This is a backward-incompatible change from YANG version 1. When updating a YANG version 1 module to 1.1 and the module uses such quote characters, the string must be changed to match the new rules. See Section 6.1.3 for details.

But the below module validates in pyang with no issues:

module charlie {
    namespace urn:charlie;
    prefix c;
    yang-version 1.1;

    container foo {
        description won't;
    }
}

validated with:

pyang -f flatten --flatten-description --flatten-keyword --strict charlie.yang