Skip to content

[minor bug] Typo in amd/src/outputdisplayarea.js causing no rendered output from stdin input fields #248

Open
@wntiv-main

Description

@wntiv-main

There is a typo in

this.textDisplay.innterHTML += line; // Perhaps this should be sanitized.
- innterHTML should be innerHTML. This causes the problem where after submitting a stdin read-ing (using the injected fields) the inputted value is not written to the output. Currently I believe, atleast UC, works around this by patching the input function (atleast in python) to also print() the inputted value - requiring a round-trip and further code execution on the server before the inputted value is displayed. Possible courses of action:

  • Fix the typo. stdinputs should now be rendered to the output display area, however this would break the expectations of many current setups where patching (e.g. UC's input() patching) is used instead to render the inputted value. If this course of action is taken, the input values should be sanitized as the comment on this line alludes to.
  • Remove this line of code. stdinputs are not expected to be shown in outputs and workarounds such as UC's input() patch will continue to function as expected. All users of coderunner would need similar patches to get the expected behaviour.

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