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

Decode at-mark and backslash ( #1307 ) #1588

Closed
wants to merge 3 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/serialization/sb2.js
Original file line number Diff line number Diff line change
Expand Up @@ -1061,7 +1061,8 @@ const parseBlock = function (sb2block, addBroadcastMsg, getVariableId, extension
children: [],
mutation: {
tagName: 'mutation',
proccode: procData[0], // e.g., "abc %n %b %s"
proccode: procData[0].replace(/\\%/g, '%').replace(/\\(.)/g, '$1'),

This comment was marked as abuse.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that this is a fullwidth percent sign-- "replace this character with another very similar looking character" strikes me as somewhat janky

// e.g., "abc %n %b %s" @todo: It uses fullwidth percent!
argumentnames: JSON.stringify(procData[1]), // e.g. ['arg1', 'arg2']
argumentids: JSON.stringify(parseProcedureArgIds(procData[0])),
argumentdefaults: JSON.stringify(procData[2]), // e.g., [1, 'abc']
Expand Down