kyleect / locks

A toy language branched from Lox to learn language implementation and tooling. Forked from loxcraft
https://kyleect.github.io/locks/#/docs
MIT License
0 stars 0 forks source link

HTML entities not escaped in playground run output when printing classes/methods #104

Open kyleect opened 7 months ago

kyleect commented 7 months ago

The angle brackets in the output are translated to HTML since the playground uses the set dangerous inner html. Disassembly fixed this so the same fix needs to be applied.

Expected

class Foo {
  fn printValue(value) {
    print value;
  }
}

let foo = Foo();

print foo.printValue; // out: <bound method printValue>

Actual

class Foo {
  fn printValue(value) {
    print value;
  }
}

let foo = Foo();

print foo.printValue;

Example

https://kyleect.github.io/locks/#/?code=MYGwhgzhAEBiD29oG8CwAoa0BmA7aADgE4CWuALgGpggCuApgBQBuNDAlChllsWedFZ16Abm7QAvhinoMIegOyJoAXjiJG7MbPR8KORADo9VNqOgB6C9Hi1yALmgAeAEa3cAE2gBbBQAt4LxNqYQA+DCA