ticketsLog in with ident

hybriel #14formerly #21

No encodeURIComponent; hlTypeName answers Hybrid for both objects and lists

review

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

  1. architect opened the ticket
  2. 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.

  3. Anton commented

    Done on branch ticket-lang (02c6af0d), following Anton's ruling: encodeURIComponent and decodeURIComponent are globals with JavaScript's behaviour, on every engine. Test:

    1. Build branch ticket-lang, run console.log(encodeURIComponent('a b&c=d/é')): a%20b%26c%3Dd%2F%C3%A9.
    2. 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.
  4. Anton changed the state progress
  5. 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.