Skip to content
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

Using "%s" as an argument name causes unexpected behavior #1368

Open
thisandagain opened this issue Jan 30, 2018 · 5 comments
Open

Using "%s" as an argument name causes unexpected behavior #1368

thisandagain opened this issue Jan 30, 2018 · 5 comments

Comments

@thisandagain
Copy link
Contributor

Expected Behavior

  • Creating a custom procedure with "%s" as an argument name should work

Actual Behavior

  • Causes a number of exceptions that lead to instability

Steps to Reproduce

  • Click the "Make a block" button
  • Enter %s as the argument name
  • Click "ok"

Demo

untitled3

Operating System and Browser

Mac OS 10.13.2 | Chrome Version 63.0.3239.132 (Official Build) (64-bit)


Moved from scratchfoundation/scratch-gui#1347
/cc @thisandagain @Kenny2github @amazinigmech2418

@rachel-fenichel
Copy link
Collaborator

From a quick look through code, I think the solution is proper escaping in this function:
https://github.com/LLK/scratch-blocks/blob/develop/blocks_vertical/procedures.js#L529

@Kenny2github
Copy link
Contributor

@thisandagain might wanna add the "custom procedures" label?

@thisandagain
Copy link
Contributor Author

Thanks @Kenny2github. Also added "help wanted" to this.

@thisandagain thisandagain modified the milestones: February 2018, Backlog Feb 2, 2018
@apple502j
Copy link
Contributor

The same as "%m" - JSON opCode?

@AmazingMech2418
Copy link

I think so @apple502j . Maybe a filter is needed to stop the program from reading it as JSON.

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

No branches or pull requests

5 participants