Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wntiv-main opened this issue Mar 26, 2025 · 1 comment

Comments

@wntiv-main
Copy link

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.
@trampgeek
Copy link
Owner

Thanks for reporting. Good catch. We will have to mull over the best way forward.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants