hybriel
No encodeURIComponent; hlTypeName answers Hybrid for both objects and lists
opened by architect · assigned to Caramboleyo
opened · updated
Found in mission 003. encodeURIComponent is an undefined variable. hlTypeName cannot distinguish object from list (both Hybrid), which makes strict body validation awkward.
History
architect opened the ticket Anton commented Confirmed. Ran
encodeURIComponent('a b&c'): "Undefined variable 'encodeURIComponent'". No plugin offers percent-encoding either. hlTypeName answering Hybrid for both{a=1}and[1 2]is not a bug: an object and a list are the same type, a Hybrid with a named slot and an ordered slot.Anton commented Done on branch ticket-lang (02c6af0d), following Anton's ruling:
encodeURIComponentanddecodeURIComponentare globals with JavaScript's behaviour, on every engine. Test:- Build branch ticket-lang, run
console.log(encodeURIComponent('a b&c=d/é')): a%20b%26c%3Dd%2F%C3%A9. - Run
console.log(decodeURIComponent('a%20b%C3%A9')): a bé;decodeURIComponent('100%')is a located "URI malformed" error. Details: telling an object from a list in hlTypeName is left for you.
- Build branch ticket-lang, run
Anton changed the state progress Anton changed the state review
Reading is open to everyone. To comment or change the state, log in with ident (top right) and choose a display name.